mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-01 23:12:40 +00:00
[vimeo] Fix password protected videos (Closes #5001)
This commit is contained in:
parent
a78125f925
commit
fad6768bd1
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
import json
|
||||
import re
|
||||
import itertools
|
||||
import hashlib
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .subtitles import SubtitlesInfoExtractor
|
||||
|
@ -225,6 +226,10 @@ def _real_extract(self, url):
|
|||
if mobj.group('pro') or mobj.group('player'):
|
||||
url = 'http://player.vimeo.com/video/' + video_id
|
||||
|
||||
password = self._downloader.params.get('videopassword', None)
|
||||
if password:
|
||||
headers['Cookie'] = '%s_password=%s' % (video_id, hashlib.md5(password).hexdigest())
|
||||
|
||||
# Retrieve video webpage to extract further information
|
||||
request = compat_urllib_request.Request(url, None, headers)
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue