forked from minhngoc25a/youtube-dl
[iqiyi] PEP8
This commit is contained in:
parent
9bac8c57e3
commit
f1da861018
|
@ -16,6 +16,7 @@ import random
|
||||||
import zlib
|
import zlib
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
|
||||||
class IqiyiIE(InfoExtractor):
|
class IqiyiIE(InfoExtractor):
|
||||||
IE_NAME = 'iqiyi'
|
IE_NAME = 'iqiyi'
|
||||||
|
|
||||||
|
@ -55,13 +56,12 @@ class IqiyiIE(InfoExtractor):
|
||||||
tm = self._download_json(
|
tm = self._download_json(
|
||||||
'http://data.video.qiyi.com/t?tn=' + str(random.random()), video_id)['t']
|
'http://data.video.qiyi.com/t?tn=' + str(random.random()), video_id)['t']
|
||||||
t = str(int(math.floor(int(tm) / (600.0))))
|
t = str(int(math.floor(int(tm) / (600.0))))
|
||||||
return hashlib.md5(
|
return hashlib.md5((t + mg + x).encode('utf8')).hexdigest()
|
||||||
(t+mg+x).encode('utf8')).hexdigest()
|
|
||||||
|
|
||||||
# get accept format
|
# get accept format
|
||||||
# getting all format will spend minutes for a big video.
|
# getting all format will spend minutes for a big video.
|
||||||
if bid == 'best':
|
if bid == 'best':
|
||||||
bids = [int(i['bid']) for i in data['vp']['tkl'][0]['vs'] \
|
bids = [int(i['bid']) for i in data['vp']['tkl'][0]['vs']
|
||||||
if 0 < int(i['bid']) <= 10]
|
if 0 < int(i['bid']) <= 10]
|
||||||
bid = str(max(bids))
|
bid = str(max(bids))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue