[twitter] fix 'TweetWithVisibilityResults' (#4369)

This commit is contained in:
Mike Fährmann
2023-08-06 22:08:50 +02:00
parent a4f7f7da17
commit 089d1a4f67

View File

@@ -1281,6 +1281,8 @@ class TwitterAPI():
}),
}
tweet = self._call(endpoint, params)["data"]["tweetResult"]["result"]
if "tweet" in tweet:
tweet = tweet["tweet"]
if tweet.get("__typename") == "TweetUnavailable":
reason = tweet.get("reason")