Skip to content

Commit

Permalink
Handle IndexError from instagram API
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocj89 committed Sep 10, 2024
1 parent 06dd28a commit 6eeae1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eas/api/instagram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Comment:
def _extract_media_pk(url):
try:
return _CLIENT.media_pk_from_url(url)
except ValueError as e:
except (ValueError, IndexError) as e:
LOG.info("Invalid instagram URL %r: %s", url, e)
raise InvalidURL(f"Invalid URL: {url}") from e

Expand Down

0 comments on commit 6eeae1d

Please sign in to comment.