From: Sergey M․ Date: Fri, 4 Dec 2020 16:56:50 +0000 (+0700) Subject: [pornhub] Handle HTTP errors gracefully (closes #26414) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=e91df0c5501bd5df9987e310a37df51129ee1cf2;p=youtube-dl [pornhub] Handle HTTP errors gracefully (closes #26414) --- diff --git a/youtube_dl/extractor/pornhub.py b/youtube_dl/extractor/pornhub.py index 69a9797aa..9ad92a8ec 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -31,7 +31,12 @@ class PornHubBaseIE(InfoExtractor): def dl(*args, **kwargs): return super(PornHubBaseIE, self)._download_webpage_handle(*args, **kwargs) - webpage, urlh = dl(*args, **kwargs) + ret = dl(*args, **kwargs) + + if not ret: + return ret + + webpage, urlh = ret if any(re.search(p, webpage) for p in ( r']+\bonload=["\']go\(\)',