From 06f065894791c84abf5ef2a24d73d2962b8f7d4e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 25 Jul 2016 23:58:49 +0200 Subject: [PATCH] fix minor bug caused during refactoring --- instagram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagram.py b/instagram.py index cb606b5..78d9e80 100755 --- a/instagram.py +++ b/instagram.py @@ -218,7 +218,7 @@ def download(name, session, profile_pic_only=False, download_videos=True, return # Catch some errors if data["entry_data"]["ProfilePage"][0]["user"]["is_private"]: - if not session: + if data["config"]["viewer"] is None: raise LoginRequiredException("user %s requires login" % name) if not data["entry_data"]["ProfilePage"][0]["user"]["followed_by_viewer"]: raise PrivateProfileNotFollowedException("user %s: private but not followed" % name)