Skip to content

Commit

Permalink
fix: add retry when solving all page links of a certain chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
wdpm committed Feb 21, 2024
1 parent 745b8a7 commit a7eb78e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/linovelib2epub/spider/linovelib_mobile_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ def _expand_paginated_chapter_links(self, chapter: CatalogLinovelibMobileChapter

# goal: solve all page links of a certain chapter
while True:
resp = requests_get_with_retry(self.session, url_next, logger=None)
resp = requests_get_with_retry(self.session, url_next,
headers=self.request_headers(),
retry_max=self.spider_settings['http_retries'],
timeout=self.spider_settings["http_timeout"],
logger=self.logger)
if resp:
soup = BeautifulSoup(resp.text, 'lxml')
else:
Expand Down

0 comments on commit a7eb78e

Please sign in to comment.