mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-24 00:01:04 +02:00
[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
This commit is contained in:
parent
09ab40b7d1
commit
30965ac66a
@ -18,6 +18,7 @@
|
||||
InAdvancePagedList,
|
||||
int_or_none,
|
||||
RegexNotFoundError,
|
||||
smuggle_url,
|
||||
std_headers,
|
||||
unsmuggle_url,
|
||||
urlencode_postdata,
|
||||
@ -267,8 +268,11 @@ def _real_extract(self, url):
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user