mirror of
https://github.com/instaloader/instaloader.git
synced 2024-09-11 16:22:24 +02:00
More serious error msg in case of nonexisting user
This commit is contained in:
parent
349181c62d
commit
ac3791c0b8
@ -188,8 +188,8 @@ def download(name, username = None, password = None, sessionfile = None, \
|
||||
# and many branches. But we don't care.
|
||||
session = load_object(sessionfile)
|
||||
data = get_json(name, session=session)
|
||||
if len(data["entry_data"]) == 0:
|
||||
raise DownloaderException("user does not exist")
|
||||
if len(data["entry_data"]) == 0 or "ProfilePage" not in data["entry_data"]:
|
||||
raise DownloaderException("user %s does not exist" % name)
|
||||
else:
|
||||
download_profilepic(name, data["entry_data"]["ProfilePage"][0]["user"]["profile_pic_url"],
|
||||
quiet=quiet)
|
||||
|
Loading…
Reference in New Issue
Block a user