Skip to content

A feature-rich command-line audio/video downloader

[vimeo] Encode password before hash calculation

Sergey M․62b013df0dcb
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index 5f8649e355..4cd2f73d99 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -228,7 +228,8 @@ class VimeoIE(VimeoBaseInfoExtractor, SubtitlesInfoExtractor):
password = self._downloader.params.get('videopassword', None)
if password:
- headers['Cookie'] = '%s_password=%s' % (video_id, hashlib.md5(password).hexdigest())
+ headers['Cookie'] = '%s_password=%s' % (
+ video_id, hashlib.md5(password.encode('utf-8')).hexdigest())
# Retrieve video webpage to extract further information
request = compat_urllib_request.Request(url, None, headers)