mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-04-29 19:44:26 +02:00
retry failed page fetch
This commit is contained in:
parent
2de870c009
commit
c7329b1d59
6
main.py
6
main.py
@ -785,7 +785,11 @@ class Udemy:
|
||||
while _next:
|
||||
logger.info("> Downloading course information.. ")
|
||||
try:
|
||||
resp = self.session._get(_next).json()
|
||||
resp = self.session._get(_next)
|
||||
if not resp.ok:
|
||||
logger.error(f"Failed to fetch a page, will retry")
|
||||
continue
|
||||
resp = resp.json()
|
||||
except conn_error as error:
|
||||
logger.fatal(f"Udemy Says: Connection error, {error}")
|
||||
time.sleep(0.8)
|
||||
|
Loading…
x
Reference in New Issue
Block a user