Skip to content

Commit

Permalink
[instagram] raise proper error for missing 'reels_media' (#5257)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 2, 2024
1 parent 82c73c7 commit 218ec1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gallery_dl/extractor/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ def media(self, shortcode):
def reels_media(self, reel_ids):
endpoint = "/v1/feed/reels_media/"
params = {"reel_ids": reel_ids}
return self._call(endpoint, params=params)["reels_media"]
try:
return self._call(endpoint, params=params)["reels_media"]
except KeyError:
raise exception.AuthorizationError("Login required")

def tags_media(self, tag):
for section in self.tags_sections(tag):
Expand Down

0 comments on commit 218ec1a

Please sign in to comment.