From 62b013df0dcb5f902d745b77b3de62b64b828863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sat, 21 Feb 2015 18:31:10 +0600 Subject: [PATCH] [vimeo] Encode password before hash calculation --- youtube_dl/extractor/vimeo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 5f8649e35..4cd2f73d9 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -228,7 +228,8 @@ def _real_extract(self, url): 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)