improved region parsing

This commit is contained in:
Robin Appelman 2025-04-15 16:19:22 +02:00
commit 2c6264ccf0
5 changed files with 3774 additions and 0 deletions

3704
tests/data/team_11789.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -40,6 +40,7 @@ fn test_parse_player_details_html(input: &str, name: &str) {
#[test_case("team_3975.html", "team_empty_player")]
#[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")]
#[cfg(feature = "serde")]
fn test_parse_team_html(input: &str, name: &str) {
let body = read_to_string(format!("tests/data/{input}")).unwrap();

View file

@ -0,0 +1,56 @@
---
source: tests/snapshot.rs
expression: parsed
---
{
"name": "Potato Game Sense",
"tag": "pgs",
"image": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/41/41d8336613741e77adfe57ccf747abad9e1209ce_full.jpg",
"format": "9v9",
"region": "south-america",
"timezone": "SA-East",
"steam_group": "http://steamcommunity.com/groups/potatogshl",
"division": "*S. America New Teams",
"description": "Batata",
"titles": [],
"members": [
{
"name": "boomer",
"steam_id": "76561198068200396",
"role": "leader",
"since": "+002014-05-13T00:00:00.000000000Z"
},
{
"name": "Angra",
"steam_id": "76561198049967350",
"role": "member",
"since": "+002014-05-13T00:00:00.000000000Z"
},
{
"name": "jota",
"steam_id": "76561198044420376",
"role": "member",
"since": "+002014-05-14T00:00:00.000000000Z"
},
{
"name": "ap Kiyoshi",
"steam_id": "76561198057649052",
"role": "member",
"since": "+002014-05-14T00:00:00.000000000Z"
},
{
"name": "darondrunk",
"steam_id": "76561198050145901",
"role": "member",
"since": "+002014-05-14T00:00:00.000000000Z"
},
{
"name": "Jacksideh",
"steam_id": "76561198045916617",
"role": "member",
"since": "+002014-05-14T00:00:00.000000000Z"
}
],
"results": [],
"name_changes": []
}