Skip to content

Commit

Permalink
[twitter] update URL for syndication API (#3160)
Browse files Browse the repository at this point in the history
Twitter changed the URL format to access tweet data through their syndication API.
  • Loading branch information
thatfuckingbird authored Nov 4, 2022
1 parent c01cad5 commit 9d3f86d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,8 +1456,8 @@ def _process_tombstone(self, entry, tombstone):
self.extractor.log.debug("Skipping %s (\"%s\")", tweet_id, text)

def _syndication_tweet(self, tweet_id):
tweet = self.extractor.request(
"https://cdn.syndication.twimg.com/tweet?id=" + tweet_id).json()
base_url = "https://cdn.syndication.twimg.com/tweet-result?id="
tweet = self.extractor.request(base_url + tweet_id).json()

tweet["user"]["description"] = ""
tweet["user"]["entities"] = {"description": {}}
Expand Down

0 comments on commit 9d3f86d

Please sign in to comment.