1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-23 10:42:30 +01:00

Don't download data json twice on private profiles

Fixes #6.
This commit is contained in:
André Koch-Kramer 2016-07-15 15:30:35 +02:00
parent bd190159f6
commit e2d8c34eac

View File

@ -221,7 +221,7 @@ def download(name, username = None, password = None, sessionfile = None, \
session, status = get_session(username, password, session=session)
if not status:
raise DownloaderException("aborting due to login error")
data = get_json(name, session=session)
data = get_json(name, session=session)
if ("nodes" not in data["entry_data"]["ProfilePage"][0]["user"]["media"] \
or len(data["entry_data"]["ProfilePage"][0]["user"]["media"]["nodes"]) == 0) \
and not profile_pic_only: