mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 10:14:11 +02:00
guess region from timezone
This commit is contained in:
parent
2c6264ccf0
commit
cf17647408
4 changed files with 4209 additions and 1 deletions
4100
tests/data/team_32595.html
Normal file
4100
tests/data/team_32595.html
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -41,6 +41,7 @@ fn test_parse_player_details_html(input: &str, name: &str) {
|
|||
#[test_case("team_2909.html", "team_1v1_sol")]
|
||||
#[test_case("team_5058.html", "team_empty_name_change2")]
|
||||
#[test_case("team_11789.html", "team_space_region")]
|
||||
#[test_case("team_32595.html", "team_asia_placement")]
|
||||
#[cfg(feature = "serde")]
|
||||
fn test_parse_team_html(input: &str, name: &str) {
|
||||
let body = read_to_string(format!("tests/data/{input}")).unwrap();
|
||||
|
|
|
|||
101
tests/snapshots/snapshot__parse_team_asia_placement_html.snap
Normal file
101
tests/snapshots/snapshot__parse_team_asia_placement_html.snap
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
---
|
||||
source: tests/snapshot.rs
|
||||
expression: parsed
|
||||
---
|
||||
{
|
||||
"name": "devilish blossom",
|
||||
"tag": "deBL",
|
||||
"image": "clan_avatars/32595_thumbnail.jpg",
|
||||
"format": "6v6",
|
||||
"region": "asia",
|
||||
"timezone": "Asia",
|
||||
"steam_group": "https://steamcommunity.com/groups/ornaminCgroup",
|
||||
"division": "Waiting for Placement",
|
||||
"description": "Our time zone is GMT +9 and syn#5501 for schedule :)",
|
||||
"titles": [],
|
||||
"members": [
|
||||
{
|
||||
"name": "highschoolgirl",
|
||||
"steam_id": "76561198161465467",
|
||||
"role": "member",
|
||||
"since": "+002023-03-04T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "NoName",
|
||||
"steam_id": "76561198098224358",
|
||||
"role": "member",
|
||||
"since": "+002023-03-04T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "sinyeon",
|
||||
"steam_id": "76561198125363469",
|
||||
"role": "member",
|
||||
"since": "+002023-03-05T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "starshopping",
|
||||
"steam_id": "76561198300632504",
|
||||
"role": "member",
|
||||
"since": "+002023-03-05T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "GreenistFalcon",
|
||||
"steam_id": "76561198101187664",
|
||||
"role": "member",
|
||||
"since": "+002023-03-05T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "SICSIN",
|
||||
"steam_id": "76561198083923462",
|
||||
"role": "member",
|
||||
"since": "+002023-03-06T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "Akash",
|
||||
"steam_id": "76561198066517317",
|
||||
"role": "member",
|
||||
"since": "+002023-03-07T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "1TOP",
|
||||
"steam_id": "76561198123717811",
|
||||
"role": "member",
|
||||
"since": "+002023-03-08T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "c1earlove",
|
||||
"steam_id": "76561199165441114",
|
||||
"role": "member",
|
||||
"since": "+002023-05-21T00:00:00.000000000Z"
|
||||
},
|
||||
{
|
||||
"name": "ukk",
|
||||
"steam_id": "76561198178372977",
|
||||
"role": "member",
|
||||
"since": "+002023-05-21T00:00:00.000000000Z"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"season": 42,
|
||||
"division": "Waiting for Placement",
|
||||
"wins": 0,
|
||||
"losses": 0
|
||||
},
|
||||
{
|
||||
"season": 40,
|
||||
"division": "Waiting for Placement",
|
||||
"wins": 6,
|
||||
"losses": 10
|
||||
}
|
||||
],
|
||||
"name_changes": [
|
||||
{
|
||||
"from_tag": "deBL",
|
||||
"from": "devilish blossom",
|
||||
"to_tag": "deBL",
|
||||
"to": "devilish blossom",
|
||||
"date": "2023-03-04"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue