download_profiles: Check errors only if required
Fixes #178, where with `--profile-pic-only` an error message is printed (without any further implications) when downloading profile pictures of private profiles without being logged in.
This commit is contained in:
parent
325e89c4b2
commit
b7ea0d5953
@ -823,7 +823,7 @@ class Instaloader:
|
||||
self.download_profilepic(profile)
|
||||
|
||||
# Catch some errors
|
||||
if profile.is_private:
|
||||
if profile.is_private and (tagged or highlights or posts):
|
||||
if not self.context.is_logged_in:
|
||||
raise LoginRequiredException("--login=USERNAME required.")
|
||||
if not profile.followed_by_viewer and self.context.username != profile.username:
|
||||
|
Loading…
Reference in New Issue
Block a user