not founds

This commit is contained in:
Robin Appelman 2023-11-18 19:37:59 +01:00
commit 43bfba6307
4 changed files with 18 additions and 13 deletions

View file

@ -1,7 +1,7 @@
use super::{ElementExt, Parser};
use crate::data::{Membership, NameChange, Record, Team};
use crate::parser::{select_text, steam_id_from_link, DATE_FORMAT, MEMBER_DATE_FORMAT};
use crate::{ParseError, Result};
use crate::{ParseError, Result, ScrapeError};
use scraper::{Html, Selector};
use time::{Date, PrimitiveDateTime, UtcOffset};
@ -111,10 +111,7 @@ impl Parser for TeamParser {
let document = Html::parse_document(document);
let root = document.root_element();
let name = select_text(root, &self.selector_name)
.ok_or(ParseError::ElementNotFound {
selector: SELECTOR_TEAM_NAME,
role: "team name",
})?
.ok_or(ScrapeError::NotFound)?
.to_string();
let tag = select_text(root, &self.selector_tag)