mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-01 23:12:40 +00:00
[vimeo] Fix authentication (Closes #7110)
This commit is contained in:
parent
4180a3d8b7
commit
47c165c3a9
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,9 @@ def _login(self):
|
|||
self.report_login()
|
||||
webpage = self._download_webpage(self._LOGIN_URL, None, False)
|
||||
token = self._extract_xsrft(webpage)
|
||||
vuid = self._search_regex(
|
||||
r'["\']vuid["\']\s*:\s*(["\'])(?P<vuid>.+?)\1',
|
||||
webpage, 'vuid', group='vuid')
|
||||
data = urlencode_postdata({
|
||||
'action': 'login',
|
||||
'email': username,
|
||||
|
@ -49,6 +52,7 @@ def _login(self):
|
|||
})
|
||||
login_request = compat_urllib_request.Request(self._LOGIN_URL, data)
|
||||
login_request.add_header('Content-Type', 'application/x-www-form-urlencoded')
|
||||
login_request.add_header('Cookie', 'vuid=%s' % vuid)
|
||||
login_request.add_header('Referer', self._LOGIN_URL)
|
||||
self._download_webpage(login_request, None, False, 'Wrong login info')
|
||||
|
||||
|
|
Loading…
Reference in a new issue