diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-10-10 05:56:01 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-10-10 05:56:01 +0600 |
commit | 47c165c3a9f40dd9a175b11f29f9e2002fdda8a9 (patch) | |
tree | 35c1203eeb35751da9e3f3b9d9fe20bd3e28037e /youtube_dl | |
parent | 4180a3d8b7c40792b5371ca8804c1dad8fabd56d (diff) |
[vimeo] Fix authentication (Closes #7110)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 50df79ca1..7dd52627d 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -40,6 +40,9 @@ class VimeoBaseInfoExtractor(InfoExtractor): 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 @@ class VimeoBaseInfoExtractor(InfoExtractor): }) 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') |