mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-04-30 00:24:25 +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:
|
while _next:
|
||||||
logger.info("> Downloading course information.. ")
|
logger.info("> Downloading course information.. ")
|
||||||
try:
|
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:
|
except conn_error as error:
|
||||||
logger.fatal(f"Udemy Says: Connection error, {error}")
|
logger.fatal(f"Udemy Says: Connection error, {error}")
|
||||||
time.sleep(0.8)
|
time.sleep(0.8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user