diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-02-18 00:27:57 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-02-18 00:27:58 +0100 |
commit | 30965ac66a4e33b8e70d6c0cf5da1a746054d6cd (patch) | |
tree | ef8bc526c50fce6add77e2c109ef7016ef0f1fb8 /youtube_dl | |
parent | 09ab40b7d1d1838aaf0ad2086e691a0d68e165f1 (diff) |
[vimeo] Prevent infinite loops if video password verification fails
We're seeing this in the tests¹ right now, which do not terminate.
¹ https://travis-ci.org/jaimeMF/youtube-dl/jobs/51135858
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 303e81447..1959d5e36 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -18,6 +18,7 @@ from ..utils import ( InAdvancePagedList, int_or_none, RegexNotFoundError, + smuggle_url, std_headers, unsmuggle_url, urlencode_postdata, @@ -267,8 +268,11 @@ class VimeoIE(VimeoBaseInfoExtractor, SubtitlesInfoExtractor): raise ExtractorError('The author has restricted the access to this video, try with the "--referer" option') if re.search(r'<form[^>]+?id="pw_form"', webpage) is not None: + if data and '_video_password_verified' in data: + raise ExtractorError('video password verification failed!') self._verify_video_password(url, video_id, webpage) - return self._real_extract(url) + return self._real_extract( + smuggle_url(url, {'_video_password_verified': 'verified'})) else: raise ExtractorError('Unable to extract info section', cause=e) |