mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[instagram] fix extraction
This commit is contained in:
parent
25fa99c947
commit
582ce1d678
@ -35,7 +35,8 @@ def instagram_download(url, output_dir='.', merge=True, info_only=False, **kwarg
|
||||
|
||||
for item in post['items']:
|
||||
code = item['code']
|
||||
for i, media in enumerate(item['carousel_media']):
|
||||
carousel_media = item.get('carousel_media') or [item]
|
||||
for i, media in enumerate(carousel_media):
|
||||
title = '%s [%s]' % (code, i)
|
||||
image_url = media['image_versions2']['candidates'][0]['url']
|
||||
ext = image_url.split('?')[0].split('.')[-1]
|
||||
|
Loading…
Reference in New Issue
Block a user