mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-22 15:57:23 +00:00
[iqiyi] PEP8
This commit is contained in:
parent
9bac8c57e3
commit
f1da861018
1 changed files with 28 additions and 28 deletions
|
@ -16,6 +16,7 @@ import random
|
|||
import zlib
|
||||
import hashlib
|
||||
|
||||
|
||||
class IqiyiIE(InfoExtractor):
|
||||
IE_NAME = 'iqiyi'
|
||||
|
||||
|
@ -55,13 +56,12 @@ class IqiyiIE(InfoExtractor):
|
|||
tm = self._download_json(
|
||||
'http://data.video.qiyi.com/t?tn=' + str(random.random()), video_id)['t']
|
||||
t = str(int(math.floor(int(tm) / (600.0))))
|
||||
return hashlib.md5(
|
||||
(t+mg+x).encode('utf8')).hexdigest()
|
||||
return hashlib.md5((t + mg + x).encode('utf8')).hexdigest()
|
||||
|
||||
# get accept format
|
||||
# getting all format will spend minutes for a big video.
|
||||
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]
|
||||
bid = str(max(bids))
|
||||
|
||||
|
|
Loading…
Reference in a new issue