From 2e8de097ad82da378e97005e8f1ff7e5aebca585 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:09:04 -0600 Subject: [PATCH] [ie/vimeo] Fix login (#9274) Closes #9273 Authored by: bashonly --- yt_dlp/extractor/vimeo.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/yt_dlp/extractor/vimeo.py b/yt_dlp/extractor/vimeo.py index 208e11184..3f60d5fb9 100644 --- a/yt_dlp/extractor/vimeo.py +++ b/yt_dlp/extractor/vimeo.py @@ -48,17 +48,15 @@ class VimeoBaseInfoExtractor(InfoExtractor): 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',