1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-04 09:22:29 +01:00

Fixed download_node()

This commit is contained in:
André Koch-Kramer 2017-04-22 01:39:52 +02:00
parent 361445519a
commit 8e77a1c125

View File

@ -478,8 +478,9 @@ def download_node(node: Dict[str, Any], session: requests.Session, name: str,
edge_number += 1
if sleep:
time.sleep(1.75 * random.random() + 0.25)
elif node['__typename'] == 'GraphImage':
downloaded = download_pic(name, node["display_url"], date, quiet=quiet)
elif node['__typename'] in ['GraphImage', 'GraphVideo']:
downloaded = download_pic(name, node["display_url"] if "display_url" in node else node["display_src"],
date, quiet=quiet)
if sleep:
time.sleep(1.75 * random.random() + 0.25)
else: