1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[vimeo] Fix non-ASCII video passwords (Closes #7352)

This commit is contained in:
Sergey M․ 2015-11-03 20:53:17 +06:00
parent a230068ff7
commit 852fad922f

View file

@ -13,6 +13,7 @@ from ..compat import (
compat_urlparse, compat_urlparse,
) )
from ..utils import ( from ..utils import (
encode_dict,
ExtractorError, ExtractorError,
InAdvancePagedList, InAdvancePagedList,
int_or_none, int_or_none,
@ -208,10 +209,10 @@ class VimeoIE(VimeoBaseInfoExtractor):
if password is None: if password is None:
raise ExtractorError('This video is protected by a password, use the --video-password option', expected=True) raise ExtractorError('This video is protected by a password, use the --video-password option', expected=True)
token, vuid = self._extract_xsrft_and_vuid(webpage) token, vuid = self._extract_xsrft_and_vuid(webpage)
data = urlencode_postdata({ data = urlencode_postdata(encode_dict({
'password': password, 'password': password,
'token': token, 'token': token,
}) }))
if url.startswith('http://'): if url.startswith('http://'):
# vimeo only supports https now, but the user can give an http url # vimeo only supports https now, but the user can give an http url
url = url.replace('http://', 'https://') url = url.replace('http://', 'https://')