map history api

This commit is contained in:
Robin Appelman 2023-11-21 20:24:01 +01:00
commit 6eec064496
8 changed files with 30 additions and 10 deletions

View file

@ -177,7 +177,7 @@ impl UgcClient {
pub async fn map_history(&self, format: GameMode) -> Result<MapHistory> {
let link = format!(
"https://www.ugcleague.com/rostertransactions_tf2{}_all.cfm",
"https://www.ugcleague.com/maplist_tf2{}.cfm",
format.letter()
);
let body = self.client.get(link).send().await?.text().await?;

View file

@ -128,7 +128,6 @@ impl Parser for MapHistoryParser {
.first_text()
.unwrap_or_default()
.trim_start_matches("Season ");
dbg!(season);
let season = season.parse().map_err(|_| ParseError::InvalidText {
role: "previous season number",
text: season.to_string(),