Skip to content

Commit

Permalink
Support TweetWithVisibilityResults (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Lee authored Sep 5, 2023
1 parent e839b27 commit 284cae9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions twitterclient/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ async def get_media_url(self, tweet_id: int) -> (list, list, str):
"""
tweet = await self.get_tweet(tweet_id)
tweet_result = tweet['data']['tweetResult']['result']
if 'legacy' not in tweet_result and 'tweet' in tweet_result:
tweet_result = tweet_result['tweet']

image_urls, video_urls, remove_urls = [], [], []
# remove_urls is the url of the image or video in the text, we will remove it later
text, name, screen_name = '', '', ''
Expand Down

0 comments on commit 284cae9

Please sign in to comment.