mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 08:05:31 +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) {
|
while let Ok(page_result) = self.evlauate_page(&html, config, global_config, article_url) {
|
||||||
if let Page::Single(single_page_url) = page_result {
|
if let Page::Single(single_page_url) = page_result {
|
||||||
if pages.is_empty() {
|
let single_page_html =
|
||||||
pages.push(
|
Self::download(&single_page_url, client, config, global_config).await?;
|
||||||
Self::download(&single_page_url, client, config, global_config).await?,
|
return Ok(vec![single_page_html]);
|
||||||
);
|
|
||||||
return Ok(pages);
|
|
||||||
}
|
|
||||||
} else if let Page::Multi(next_page_url) = page_result {
|
} else if let Page::Multi(next_page_url) = page_result {
|
||||||
if let Some(next_page_url) = next_page_url {
|
if let Some(next_page_url) = next_page_url {
|
||||||
let next_page_html =
|
let next_page_html =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue