mirror of https://github.com/blackjack4494/yt-dlc
[youku] PEP8
This commit is contained in:
parent
8268e94cd4
commit
aed473ccf9
|
@ -11,6 +11,7 @@ from ..compat import compat_urllib_parse
|
|||
|
||||
bytes_is_str = (bytes == str) # for compatible
|
||||
|
||||
|
||||
class YoukuIE(InfoExtractor):
|
||||
IE_NAME = 'youku'
|
||||
_VALID_URL = r'''(?x)
|
||||
|
@ -52,8 +53,8 @@ class YoukuIE(InfoExtractor):
|
|||
|
||||
sid, token = yk_t(
|
||||
'becaf9be',
|
||||
base64.b64decode(bytes(data2['ep'], 'ascii')) \
|
||||
if not bytes_is_str \
|
||||
base64.b64decode(bytes(data2['ep'], 'ascii'))
|
||||
if not bytes_is_str
|
||||
else base64.b64decode(data2['ep'])
|
||||
).split('_')
|
||||
|
||||
|
@ -89,13 +90,13 @@ class YoukuIE(InfoExtractor):
|
|||
fileid = get_fileid(format, n)
|
||||
ep_t = yk_t(
|
||||
'bf7e5f01',
|
||||
bytes('%s_%s_%s' % (sid, fileid, token), 'ascii') \
|
||||
if not bytes_is_str \
|
||||
bytes('%s_%s_%s' % (sid, fileid, token), 'ascii')
|
||||
if not bytes_is_str
|
||||
else ('%s_%s_%s' % (sid, fileid, token))
|
||||
)
|
||||
ep = base64.b64encode(
|
||||
bytes(ep_t, 'latin') \
|
||||
if not bytes_is_str \
|
||||
bytes(ep_t, 'latin')
|
||||
if not bytes_is_str
|
||||
else ep_t
|
||||
).decode()
|
||||
return ep
|
||||
|
@ -194,7 +195,6 @@ class YoukuIE(InfoExtractor):
|
|||
# construct info
|
||||
entries = []
|
||||
for fm in data1['streamtypes']:
|
||||
#formats = []
|
||||
video_urls = video_urls_dict[fm]
|
||||
for i in range(len(video_urls)):
|
||||
if len(entries) < i + 1:
|
||||
|
|
Loading…
Reference in New Issue