1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-17 00:22:34 +01:00

[ie/vimeo] Fix login (#9274)

Closes #9273
Authored by: bashonly
This commit is contained in:
bashonly 2024-02-24 17:09:04 -06:00 committed by GitHub
parent f3d5face83
commit 2e8de097ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,17 +48,15 @@ def _unsmuggle_headers(self, url):
return url, data, headers
def _perform_login(self, username, password):
webpage = self._download_webpage(
self._LOGIN_URL, None, 'Downloading login page')
token, vuid = self._extract_xsrft_and_vuid(webpage)
viewer = self._download_json('https://vimeo.com/_next/viewer', None, 'Downloading login token')
data = {
'action': 'login',
'email': username,
'password': password,
'service': 'vimeo',
'token': token,
'token': viewer['xsrft'],
}
self._set_vimeo_cookie('vuid', vuid)
self._set_vimeo_cookie('vuid', viewer['vuid'])
try:
self._download_webpage(
self._LOGIN_URL, None, 'Logging in',