mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
fix teams with no timezone
This commit is contained in:
parent
14faa36a12
commit
1a997aef36
9 changed files with 3043 additions and 13 deletions
|
|
@ -90,7 +90,7 @@ pub struct Team {
|
|||
pub tag: String,
|
||||
pub image: String,
|
||||
pub format: String,
|
||||
pub timezone: String,
|
||||
pub timezone: Option<String>,
|
||||
pub division: String,
|
||||
pub description: String,
|
||||
pub titles: Vec<String>,
|
||||
|
|
|
|||
|
|
@ -154,12 +154,7 @@ impl Parser for TeamParser {
|
|||
})?
|
||||
.to_string();
|
||||
|
||||
let timezone = select_text(root, &self.selector_team_timezone)
|
||||
.ok_or(ParseError::ElementNotFound {
|
||||
selector: SELECTOR_TEAM_TIMEZONE,
|
||||
role: "team timzone",
|
||||
})?
|
||||
.to_string();
|
||||
let timezone = select_text(root, &self.selector_team_timezone).map(String::from);
|
||||
|
||||
let description = select_text(root, &self.selector_team_description)
|
||||
.unwrap_or_default()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue