mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
handle team matches without match links
This commit is contained in:
parent
766d0333cd
commit
cc3ea78778
6 changed files with 6052 additions and 2743 deletions
|
|
@ -179,8 +179,8 @@ impl Parser for TeamMatchesParser {
|
|||
})
|
||||
.transpose()?;
|
||||
|
||||
let result = match (opponent, points, points_opponent) {
|
||||
(Some(opponent), Some(point), Some(points_opponent)) => {
|
||||
let result = match (opponent, points, points_opponent, id) {
|
||||
(Some(opponent), Some(point), Some(points_opponent), Some(_)) => {
|
||||
MatchResult::Played {
|
||||
id: id.ok_or(ParseError::ElementNotFound {
|
||||
selector: SELECTOR_SEASON_MATCH_PAGE,
|
||||
|
|
@ -193,7 +193,7 @@ impl Parser for TeamMatchesParser {
|
|||
match_points_opponent: points_opponent,
|
||||
}
|
||||
}
|
||||
(Some(opponent), None, None) => MatchResult::Pending {
|
||||
(Some(opponent), None, None, Some(_)) => MatchResult::Pending {
|
||||
id: id.ok_or(ParseError::ElementNotFound {
|
||||
selector: SELECTOR_SEASON_MATCH_PAGE,
|
||||
role: "match page link",
|
||||
|
|
@ -202,6 +202,7 @@ impl Parser for TeamMatchesParser {
|
|||
score,
|
||||
score_opponent,
|
||||
},
|
||||
(Some(opponent), _, _, None) => MatchResult::Unknown { opponent },
|
||||
_ => MatchResult::ByeWeek,
|
||||
};
|
||||
Ok(TeamSeasonMatch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue