1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 16:36:48 +00:00

[iqiyi] Use md5_text for all MD5 calls

This commit is contained in:
Yen Chi Hsuan 2015-09-23 22:25:16 +08:00
parent 57565375c8
commit 19f93d906e

View File

@ -125,7 +125,7 @@ class IqiyiIE(InfoExtractor):
note='Download path key of segment %d for format %s' % (segment_index + 1, format_id) note='Download path key of segment %d for format %s' % (segment_index + 1, format_id)
)['t'] )['t']
t = str(int(math.floor(int(tm) / (600.0)))) t = str(int(math.floor(int(tm) / (600.0))))
return hashlib.md5((t + mg + x).encode('utf8')).hexdigest() return self.md5_text(t + mg + x)
video_urls_dict = {} video_urls_dict = {}
for format_item in data['vp']['tkl'][0]['vs']: for format_item in data['vp']['tkl'][0]['vs']:
@ -186,7 +186,7 @@ class IqiyiIE(InfoExtractor):
tail = tm + tvid tail = tm + tvid
param = { param = {
'key': 'fvip', 'key': 'fvip',
'src': hashlib.md5(b'youtube-dl').hexdigest(), 'src': self.md5_text('youtube-dl'),
'tvId': tvid, 'tvId': tvid,
'vid': video_id, 'vid': video_id,
'vinfo': 1, 'vinfo': 1,