mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 13:52:36 +00:00
[vimeo] Use _form_hidden_inputs
This commit is contained in:
parent
2688176c77
commit
de195c23a6
|
@ -452,11 +452,7 @@ def _login_list_password(self, page_url, list_id, webpage):
|
||||||
password = self._downloader.params.get('videopassword', None)
|
password = self._downloader.params.get('videopassword', None)
|
||||||
if password is None:
|
if password is None:
|
||||||
raise ExtractorError('This album is protected by a password, use the --video-password option', expected=True)
|
raise ExtractorError('This album is protected by a password, use the --video-password option', expected=True)
|
||||||
fields = dict(re.findall(r'''(?x)<input\s+
|
fields = self._form_hidden_inputs(login_form)
|
||||||
type="hidden"\s+
|
|
||||||
name="([^"]+)"\s+
|
|
||||||
value="([^"]*)"
|
|
||||||
''', login_form))
|
|
||||||
token = self._search_regex(r'xsrft[\s=:"\']+([^"\']+)', webpage, 'login token')
|
token = self._search_regex(r'xsrft[\s=:"\']+([^"\']+)', webpage, 'login token')
|
||||||
fields['token'] = token
|
fields['token'] = token
|
||||||
fields['password'] = password
|
fields['password'] = password
|
||||||
|
|
Loading…
Reference in a new issue