mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 00:19:59 +02:00
less dramatic logging
This commit is contained in:
parent
afe661fe6c
commit
23514aff9e
1 changed files with 2 additions and 2 deletions
|
@ -230,14 +230,14 @@ impl ArticleScraper {
|
|||
thorw_if_empty: bool,
|
||||
) -> Result<Vec<Node>, ScraperError> {
|
||||
let res = xpath_ctx.evaluate(xpath).map_err(|()| {
|
||||
error!("Evaluation of xpath '{}' yielded no results", xpath);
|
||||
debug!("Evaluation of xpath '{}' yielded no results", xpath);
|
||||
ScraperErrorKind::Xml
|
||||
})?;
|
||||
|
||||
let node_vec = res.get_nodes_as_vec();
|
||||
|
||||
if node_vec.len() == 0 {
|
||||
error!("Evaluation of xpath '{}' yielded no results", xpath);
|
||||
debug!("Evaluation of xpath '{}' yielded no results", xpath);
|
||||
if thorw_if_empty {
|
||||
return Err(ScraperErrorKind::Xml)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue