Skip to content

Commit

Permalink
[instagram] better error message for invalid users (#4606)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 2, 2023
1 parent 482f002 commit aa77fda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/instagram.py
Expand Up @@ -710,7 +710,8 @@ def tags_sections(self, tag):
def user_by_name(self, screen_name):
endpoint = "/v1/users/web_profile_info/"
params = {"username": screen_name}
return self._call(endpoint, params=params)["data"]["user"]
return self._call(
endpoint, params=params, notfound="user")["data"]["user"]

@memcache(keyarg=1)
def user_by_id(self, user_id):
Expand Down

0 comments on commit aa77fda

Please sign in to comment.