mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 08:30:00 +02:00
somewhat complete readability algorithm
This commit is contained in:
parent
979358fd35
commit
71a8816747
5 changed files with 620 additions and 92 deletions
|
@ -182,7 +182,7 @@ impl FullTextParser {
|
|||
let found_body = Self::extract_body(&xpath_ctx, root, config, global_config)?;
|
||||
|
||||
if found_body {
|
||||
if let Err(error) = Readability::extract_body_readability(&document, root) {
|
||||
if let Err(error) = Readability::extract_body_readability(document, root) {
|
||||
log::error!("Both ftr and readability failed to find content: {}", error);
|
||||
return Err(error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue