fix: large courses not always working correctly

Seems like Udemy changed something and large courses can return a 504 error now
This commit is contained in:
Puyodead1 2022-03-15 20:38:42 -04:00 committed by GitHub
parent 885d920fba
commit 07bfb9163b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -641,7 +641,7 @@ class Udemy:
url = COURSE_URL.format(portal_name=portal_name, course_id=course_id)
try:
resp = self.session._get(url)
if resp.status_code in [502, 503]:
if resp.status_code in [502, 503, 504]:
logger.info(
"> The course content is large, using large content extractor..."
)