mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[twitter] small fix
This commit is contained in:
parent
81b1f06a05
commit
4746af3462
@ -84,7 +84,7 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs)
|
|||||||
if 'video_info' in medium:
|
if 'video_info' in medium:
|
||||||
variants = medium['video_info']['variants']
|
variants = medium['video_info']['variants']
|
||||||
variants = sorted(variants, key=lambda kv: kv.get('bitrate', 0))
|
variants = sorted(variants, key=lambda kv: kv.get('bitrate', 0))
|
||||||
title = item_id + '_' + variants[-1]['url'].split('/')[-1].split('?')[0]
|
title = item_id + '_' + variants[-1]['url'].split('/')[-1].split('?')[0].split('.')[0]
|
||||||
urls = [ variants[-1]['url'] ]
|
urls = [ variants[-1]['url'] ]
|
||||||
size = urls_size(urls)
|
size = urls_size(urls)
|
||||||
mime, ext = variants[-1]['content_type'], 'mp4'
|
mime, ext = variants[-1]['content_type'], 'mp4'
|
||||||
|
Loading…
Reference in New Issue
Block a user