diff --git a/src/you_get/extractors/qq.py b/src/you_get/extractors/qq.py index 00a99cd9..66487b8e 100644 --- a/src/you_get/extractors/qq.py +++ b/src/you_get/extractors/qq.py @@ -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)