get_tweets

 1import requests
 2async def get_tweet(tweet:str):
 3    """
 4    Uses Twitter's Oemebed to return tweet data.
 5    Args:
 6        query (str) : The url of the tweet
 7    Returns:
 8        JSON: html data of the embeded tweet.
 9    """
10    r = requests.get("https://publish.twitter.com/oembed?url=%s" % tweet)
11    r = r.json()['html']
12    return r 
async def get_tweet(tweet: str):
 3async def get_tweet(tweet:str):
 4    """
 5    Uses Twitter's Oemebed to return tweet data.
 6    Args:
 7        query (str) : The url of the tweet
 8    Returns:
 9        JSON: html data of the embeded tweet.
10    """
11    r = requests.get("https://publish.twitter.com/oembed?url=%s" % tweet)
12    r = r.json()['html']
13    return r 

Uses Twitter's Oemebed to return tweet data. Args: query (str) : The url of the tweet Returns: JSON: html data of the embeded tweet.