1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-10 01:15:31 +02:00
This commit is contained in:
Jan Lukas Gernert 2023-01-01 21:35:46 +01:00
parent 2750ad648d
commit 979358fd35
6 changed files with 318 additions and 51 deletions

View file

@ -1,8 +1,8 @@
pub mod config;
pub mod error;
mod fingerprints;
mod readability;
mod metadata;
mod readability;
#[cfg(test)]
mod tests;
@ -387,14 +387,14 @@ impl FullTextParser {
}
if let Ok(thumb) =
Util::get_attribute(context, "//meta[contains(@name, 'og:image')]", "content")
Util::get_attribute(context, "//meta[contains(@name, 'og:image')]", "content")
{
article.thumbnail_url = Some(thumb);
return;
}
if let Ok(thumb) =
Util::get_attribute(context, "//link[contains(@rel, 'image_src')]", "href")
Util::get_attribute(context, "//link[contains(@rel, 'image_src')]", "href")
{
article.thumbnail_url = Some(thumb);
}