1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 08:05:31 +02:00

overhaul non-readability tests

This commit is contained in:
Jan Lukas Gernert 2023-04-27 07:40:28 +02:00
parent f737ab27fd
commit 34a737c89c
17 changed files with 3026 additions and 133 deletions

View file

@ -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 {