[twitter] update URL for syndication API (#3160)

Twitter changed the URL format to access tweet data through their syndication API.
This commit is contained in:
thatfuckingbird
2022-11-04 17:49:45 +01:00
committed by GitHub
parent c01cad599a
commit 9d3f86dbcd

View File

@@ -1456,8 +1456,8 @@ class TwitterAPI():
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": {}}