mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
fix download error like this url http://v.qq.com/page/m/a/h/m0195j57pah.html
This commit is contained in:
parent
07d8ae745b
commit
54cafb3d3c
@ -10,7 +10,12 @@ def qq_download_by_vid(vid, title, output_dir='.', merge=True, info_only=False):
|
||||
output_json = json.loads(match1(content, r'QZOutputJson=(.*)')[:-1])
|
||||
url = output_json['vl']['vi'][0]['ul']['ui'][0]['url']
|
||||
fvkey = output_json['vl']['vi'][0]['fvkey']
|
||||
url = '%s/%s.mp4?vkey=%s' % ( url, vid, fvkey )
|
||||
mp4 = output_json['vl']['vi'][0]['cl'].get('ci', None)
|
||||
if mp4:
|
||||
mp4 = mp4[0]['keyid'].replace('.10', '.p') + '.mp4'
|
||||
else:
|
||||
mp4 = output_json['vl']['vi'][0]['fn']
|
||||
url = '%s/%s?vkey=%s' % ( url, mp4, fvkey )
|
||||
_, ext, size = url_info(url, faker=True)
|
||||
|
||||
print_info(site_info, title, ext, size)
|
||||
|
Loading…
Reference in New Issue
Block a user