mirror of
https://github.com/instaloader/instaloader.git
synced 2024-09-11 16:22:24 +02:00
parent
ca54088bdc
commit
1928db63bb
@ -810,7 +810,7 @@ class Instaloader:
|
|||||||
date=post.date, shortcode=post.shortcode)
|
date=post.date, shortcode=post.shortcode)
|
||||||
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
||||||
|
|
||||||
# Download the image(s) / video thumbnail
|
# Download the image(s) / video thumbnail and videos within sidecars if desired
|
||||||
if post.typename == 'GraphSidecar':
|
if post.typename == 'GraphSidecar':
|
||||||
edge_number = 1
|
edge_number = 1
|
||||||
downloaded = True
|
downloaded = True
|
||||||
@ -819,6 +819,12 @@ class Instaloader:
|
|||||||
url=edge['node']['display_url'],
|
url=edge['node']['display_url'],
|
||||||
mtime=post.date,
|
mtime=post.date,
|
||||||
filename_suffix=str(edge_number))
|
filename_suffix=str(edge_number))
|
||||||
|
# Additionally download video if available and desired
|
||||||
|
if edge['node']['is_video'] and self.download_videos is Tristate.always:
|
||||||
|
self.download_pic(filename=filename,
|
||||||
|
url=edge['node']['video_url'],
|
||||||
|
mtime=post.date,
|
||||||
|
filename_suffix=str(edge_number))
|
||||||
downloaded = downloaded and edge_downloaded
|
downloaded = downloaded and edge_downloaded
|
||||||
edge_number += 1
|
edge_number += 1
|
||||||
elif post.typename in ['GraphImage', 'GraphVideo']:
|
elif post.typename in ['GraphImage', 'GraphVideo']:
|
||||||
|
Loading…
Reference in New Issue
Block a user