diff options
author | Remita Amine <remitamine@gmail.com> | 2019-01-22 18:21:37 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2019-01-22 18:21:37 +0100 |
commit | 503b604a316837b9dd6ef32045e4e9bbfb6a1363 (patch) | |
tree | 4916fccc1e73bd3d9e8daf22aeb5e8c1ab736d4b /youtube_dl | |
parent | 4b85f0f9db9329ef1774a66c3e2fd4da558a5201 (diff) |
[vrv] fix oauth signing for python 2(#14307)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vrv.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index 014513051..6c060ae76 100644 --- a/youtube_dl/extractor/vrv.py +++ b/youtube_dl/extractor/vrv.py @@ -32,14 +32,14 @@ class VRVBaseIE(InfoExtractor): def _call_api(self, path, video_id, note, data=None): # https://tools.ietf.org/html/rfc5849#section-3 base_url = self._API_DOMAIN + '/core/' + path - query = { - 'oauth_consumer_key': self._API_PARAMS['oAuthKey'], - 'oauth_nonce': ''.join([random.choice(string.ascii_letters) for _ in range(32)]), - 'oauth_signature_method': 'HMAC-SHA1', - 'oauth_timestamp': int(time.time()), - } + query = [ + ('oauth_consumer_key', self._API_PARAMS['oAuthKey']), + ('oauth_nonce', ''.join([random.choice(string.ascii_letters) for _ in range(32)])), + ('oauth_signature_method', 'HMAC-SHA1'), + ('oauth_timestamp', int(time.time())), + ] if self._TOKEN: - query['oauth_token'] = self._TOKEN + query.append(('oauth_token', self._TOKEN)) encoded_query = compat_urllib_parse_urlencode(query) headers = self.geo_verification_headers() if data: |