Skip to content

Commit

Permalink
[twitter] fix some 'original' retweets not downloading (#3744)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 8, 2023
1 parent ea3d95e commit 9037128
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,8 @@ def _pagination_tweets(self, endpoint, variables,

if "retweeted_status_result" in legacy:
retweet = legacy["retweeted_status_result"]["result"]
if "tweet" in retweet:
retweet = retweet["tweet"]
if original_retweets:
try:
retweet["legacy"]["retweeted_status_id_str"] = \
Expand Down

2 comments on commit 9037128

@ClosedPort22
Copy link
Contributor

@ClosedPort22 ClosedPort22 commented on 9037128 Mar 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only affect logged-in sessions? I tried to fetch the UserTweets timeline anonymously and there were no "tweet" keys. Enabling syndication also seemed to fix the issue.

@mikf
Copy link
Owner Author

@mikf mikf commented on 9037128 Mar 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only tested with the example Tweets from #3744, which are all NSFW and therefore require login, so probably.

These Tweets and Retweets are "__typename": "TweetWithVisibilityResults" instead of the regular "__typename": "Tweet".

Please sign in to comment.