mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
overhaul non-readability tests
This commit is contained in:
parent
f737ab27fd
commit
34a737c89c
17 changed files with 3026 additions and 133 deletions
|
@ -120,7 +120,7 @@ async fn extract_ftr(
|
|||
};
|
||||
|
||||
let full_text_parser = FullTextParser::new(None).await;
|
||||
let result = match full_text_parser
|
||||
let article = match full_text_parser
|
||||
.parse_offline(&html, config.as_ref(), base_url)
|
||||
.await
|
||||
{
|
||||
|
@ -131,6 +131,14 @@ async fn extract_ftr(
|
|||
}
|
||||
};
|
||||
|
||||
let result = match article.get_content() {
|
||||
Some(res) => res,
|
||||
None => {
|
||||
log::error!("Failed to serialize document");
|
||||
exit(0);
|
||||
}
|
||||
};
|
||||
|
||||
let output = if let Some(output) = output {
|
||||
output
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue