[compat] Add compat_urllib_parse_urlencode and eliminate encode_dict
encode_dict functionality has been improved and moved directly into compat_urllib_parse_urlencode All occurrences of compat_urllib_parse.urlencode throughout the codebase have been replaced by compat_urllib_parse_urlencode Closes #8974
This commit is contained in:
parent
2156f16ca7
commit
15707c7e02
84 changed files with 229 additions and 222 deletions
|
@ -11,7 +11,7 @@ from .common import InfoExtractor
|
|||
from ..compat import (
|
||||
compat_ord,
|
||||
compat_str,
|
||||
compat_urllib_parse,
|
||||
compat_urllib_parse_urlencode,
|
||||
)
|
||||
from ..utils import (
|
||||
determine_ext,
|
||||
|
@ -122,7 +122,7 @@ class LeIE(InfoExtractor):
|
|||
'domain': 'www.le.com'
|
||||
}
|
||||
play_json_req = sanitized_Request(
|
||||
'http://api.le.com/mms/out/video/playJson?' + compat_urllib_parse.urlencode(params)
|
||||
'http://api.le.com/mms/out/video/playJson?' + compat_urllib_parse_urlencode(params)
|
||||
)
|
||||
cn_verification_proxy = self._downloader.params.get('cn_verification_proxy')
|
||||
if cn_verification_proxy:
|
||||
|
@ -151,7 +151,7 @@ class LeIE(InfoExtractor):
|
|||
for format_id in formats:
|
||||
if format_id in dispatch:
|
||||
media_url = playurl['domain'][0] + dispatch[format_id][0]
|
||||
media_url += '&' + compat_urllib_parse.urlencode({
|
||||
media_url += '&' + compat_urllib_parse_urlencode({
|
||||
'm3v': 1,
|
||||
'format': 1,
|
||||
'expect': 3,
|
||||
|
@ -305,7 +305,7 @@ class LetvCloudIE(InfoExtractor):
|
|||
}
|
||||
self.sign_data(data)
|
||||
return self._download_json(
|
||||
'http://api.letvcloud.com/gpc.php?' + compat_urllib_parse.urlencode(data),
|
||||
'http://api.letvcloud.com/gpc.php?' + compat_urllib_parse_urlencode(data),
|
||||
media_id, 'Downloading playJson data for type %s' % cf)
|
||||
|
||||
play_json = get_play_json(cf, time.time())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue