diff options
author | Joseph Spiros <joseph@josephspiros.com> | 2018-03-24 03:57:34 -0400 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2018-03-24 14:57:34 +0700 |
commit | 16132cff7231d591bc4e6e3a12c02f9110d54e11 (patch) | |
tree | deb5a7ad43f966c031a714412342e8adf58f9d52 /youtube_dl | |
parent | 86e1958944952afbe208101802c90f9a096adea9 (diff) |
[vrv] Fix extraction on python2 (closes #15928)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vrv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index 9959627c0..64b13f0ed 100644 --- a/youtube_dl/extractor/vrv.py +++ b/youtube_dl/extractor/vrv.py @@ -12,7 +12,7 @@ import time from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, - compat_urlparse, + compat_urllib_parse, ) from ..utils import ( float_or_none, @@ -39,11 +39,11 @@ class VRVBaseIE(InfoExtractor): data = json.dumps(data).encode() headers['Content-Type'] = 'application/json' method = 'POST' if data else 'GET' - base_string = '&'.join([method, compat_urlparse.quote(base_url, ''), compat_urlparse.quote(encoded_query, '')]) + base_string = '&'.join([method, compat_urllib_parse.quote(base_url, ''), compat_urllib_parse.quote(encoded_query, '')]) oauth_signature = base64.b64encode(hmac.new( (self._API_PARAMS['oAuthSecret'] + '&').encode('ascii'), base_string.encode(), hashlib.sha1).digest()).decode() - encoded_query += '&oauth_signature=' + compat_urlparse.quote(oauth_signature, '') + encoded_query += '&oauth_signature=' + compat_urllib_parse.quote(oauth_signature, '') return self._download_json( '?'.join([base_url, encoded_query]), video_id, note='Downloading %s JSON metadata' % note, headers=headers, data=data) |