mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
fix download loop
This commit is contained in:
parent
582834cdf1
commit
a31956531a
1 changed files with 3 additions and 6 deletions
|
@ -157,12 +157,9 @@ impl FullTextParser {
|
|||
|
||||
while let Ok(page_result) = self.evlauate_page(&html, config, global_config, article_url) {
|
||||
if let Page::Single(single_page_url) = page_result {
|
||||
if pages.is_empty() {
|
||||
pages.push(
|
||||
Self::download(&single_page_url, client, config, global_config).await?,
|
||||
);
|
||||
return Ok(pages);
|
||||
}
|
||||
let single_page_html =
|
||||
Self::download(&single_page_url, client, config, global_config).await?;
|
||||
return Ok(vec![single_page_html]);
|
||||
} else if let Page::Multi(next_page_url) = page_result {
|
||||
if let Some(next_page_url) = next_page_url {
|
||||
let next_page_html =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue