mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[instagram] fix video extraction
This commit is contained in:
parent
582ce1d678
commit
7017c9e73f
@ -50,6 +50,20 @@ def instagram_download(url, output_dir='.', merge=True, info_only=False, **kwarg
|
|||||||
total_size=size,
|
total_size=size,
|
||||||
output_dir=output_dir)
|
output_dir=output_dir)
|
||||||
|
|
||||||
|
# download videos (if any)
|
||||||
|
if 'video_versions' in media:
|
||||||
|
video_url = media['video_versions'][0]['url']
|
||||||
|
ext = video_url.split('?')[0].split('.')[-1]
|
||||||
|
size = int(get_head(video_url)['Content-Length'])
|
||||||
|
|
||||||
|
print_info(site_info, title, ext, size)
|
||||||
|
if not info_only:
|
||||||
|
download_urls(urls=[video_url],
|
||||||
|
title=title,
|
||||||
|
ext=ext,
|
||||||
|
total_size=size,
|
||||||
|
output_dir=output_dir)
|
||||||
|
|
||||||
site_info = "Instagram.com"
|
site_info = "Instagram.com"
|
||||||
download = instagram_download
|
download = instagram_download
|
||||||
download_playlist = playlist_not_supported('instagram')
|
download_playlist = playlist_not_supported('instagram')
|
||||||
|
Loading…
Reference in New Issue
Block a user