Skip to content

Commit

Permalink
[twitter] restore errors for protected timelines etc (fixes mikf#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 30, 2022
1 parent ebd3d5c commit d33227f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,13 +1083,15 @@ def _pagination_tweets(self, endpoint, variables, path=None):
instructions = (data["user"]["result"]["timeline"]
["timeline"]["instructions"])
else:
instructions = data
for key in path:
data = data[key]
instructions = data["instructions"]
instructions = instructions[key]
instructions = instructions["instructions"]

entries = instructions[0]["entries"]
except (KeyError, IndexError):
return
self.extractor.log.debug(data)
raise exception.StopExtraction("Unable to retrieve Tweets")

tweets = []
tweet = cursor = None
Expand Down

0 comments on commit d33227f

Please sign in to comment.