mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
parent
f3d5face83
commit
2e8de097ad
1 changed files with 3 additions and 5 deletions
|
@ -48,17 +48,15 @@ def _unsmuggle_headers(self, url):
|
||||||
return url, data, headers
|
return url, data, headers
|
||||||
|
|
||||||
def _perform_login(self, username, password):
|
def _perform_login(self, username, password):
|
||||||
webpage = self._download_webpage(
|
viewer = self._download_json('https://vimeo.com/_next/viewer', None, 'Downloading login token')
|
||||||
self._LOGIN_URL, None, 'Downloading login page')
|
|
||||||
token, vuid = self._extract_xsrft_and_vuid(webpage)
|
|
||||||
data = {
|
data = {
|
||||||
'action': 'login',
|
'action': 'login',
|
||||||
'email': username,
|
'email': username,
|
||||||
'password': password,
|
'password': password,
|
||||||
'service': 'vimeo',
|
'service': 'vimeo',
|
||||||
'token': token,
|
'token': viewer['xsrft'],
|
||||||
}
|
}
|
||||||
self._set_vimeo_cookie('vuid', vuid)
|
self._set_vimeo_cookie('vuid', viewer['vuid'])
|
||||||
try:
|
try:
|
||||||
self._download_webpage(
|
self._download_webpage(
|
||||||
self._LOGIN_URL, None, 'Logging in',
|
self._LOGIN_URL, None, 'Logging in',
|
||||||
|
|
Loading…
Reference in a new issue