mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
[qq]fix bad json with fragment_count equals 0
This commit is contained in:
parent
1cd4ab7a19
commit
35905c2bac
@ -18,7 +18,9 @@ def qq_download_by_vid(vid, title, output_dir='.', merge=True, info_only=False):
|
|||||||
title = video_json['vl']['vi'][0]['ti']
|
title = video_json['vl']['vi'][0]['ti']
|
||||||
host = video_json['vl']['vi'][0]['ul']['ui'][0]['url']
|
host = video_json['vl']['vi'][0]['ul']['ui'][0]['url']
|
||||||
streams = video_json['fl']['fi']
|
streams = video_json['fl']['fi']
|
||||||
seg_cnt = len(video_json['vl']['vi'][0]['cl']['ci'])
|
seg_cnt = video_json['vl']['vi'][0]['cl']['fc']
|
||||||
|
if seg_cnt == 0:
|
||||||
|
seg_cnt = 1
|
||||||
|
|
||||||
best_quality = streams[-1]['name']
|
best_quality = streams[-1]['name']
|
||||||
part_format_id = streams[-1]['id']
|
part_format_id = streams[-1]['id']
|
||||||
|
Loading…
Reference in New Issue
Block a user