projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5636e9
)
[pornhub] Handle HTTP errors gracefully (closes #26414)
author
Sergey M․
<dstftw@gmail.com>
Fri, 4 Dec 2020 16:56:50 +0000
(23:56 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 4 Dec 2020 16:56:50 +0000
(23:56 +0700)
youtube_dl/extractor/pornhub.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornhub.py
b/youtube_dl/extractor/pornhub.py
index 69a9797aad4dd8d604137369d324c22f45beb9a0..9ad92a8ecf374b9615ed763907fbbece6907967e 100644
(file)
--- 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'<body\b[^>]+\bonload=["\']go\(\)',