mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-10 01:15:31 +02:00
more
This commit is contained in:
parent
2750ad648d
commit
979358fd35
6 changed files with 318 additions and 51 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue