mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[compat] Remove more functions
Removing any more will require changes to a large number of extractors
This commit is contained in:
		| @@ -1,17 +1,14 @@ | ||||
| import base64 | ||||
| import json | ||||
| import hashlib | ||||
| import hmac | ||||
| import json | ||||
| import random | ||||
| import string | ||||
| import time | ||||
| import urllib.parse | ||||
| 
 | ||||
| from .common import InfoExtractor | ||||
| from ..compat import ( | ||||
|     compat_HTTPError, | ||||
|     compat_urllib_parse_urlencode, | ||||
|     compat_urllib_parse, | ||||
| ) | ||||
| from ..compat import compat_HTTPError, compat_urllib_parse_urlencode | ||||
| from ..utils import ( | ||||
|     ExtractorError, | ||||
|     float_or_none, | ||||
| @@ -46,12 +43,12 @@ class VRVBaseIE(InfoExtractor): | ||||
|             headers['Content-Type'] = 'application/json' | ||||
|         base_string = '&'.join([ | ||||
|             'POST' if data else 'GET', | ||||
|             compat_urllib_parse.quote(base_url, ''), | ||||
|             compat_urllib_parse.quote(encoded_query, '')]) | ||||
|             urllib.parse.quote(base_url, ''), | ||||
|             urllib.parse.quote(encoded_query, '')]) | ||||
|         oauth_signature = base64.b64encode(hmac.new( | ||||
|             (self._API_PARAMS['oAuthSecret'] + '&' + self._TOKEN_SECRET).encode('ascii'), | ||||
|             base_string.encode(), hashlib.sha1).digest()).decode() | ||||
|         encoded_query += '&oauth_signature=' + compat_urllib_parse.quote(oauth_signature, '') | ||||
|         encoded_query += '&oauth_signature=' + urllib.parse.quote(oauth_signature, '') | ||||
|         try: | ||||
|             return self._download_json( | ||||
|                 '?'.join([base_url, encoded_query]), video_id, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan