I am using this documentation to get the title of a summary card of a tweet:
https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/intro-to-tweet-json
I want to grab the info “"title": "Building the Future of the Twitter API Platform"”, but my tweet object output looks far different from this example. Here is the current output I am recieving:
{u'symbols': [], u'user_mentions': [], u'hashtags': [], u'urls': [{u'url': u'https://t.co/AWnWPU9LaD', u'indices': [51, 74], u'expanded_url': u'http://vogue.cm/dvWmSjY', u'display_url': u'vogue.cm/dvWmSjY'}]}
Here is my code:
username = "@voguemagazine"
theTimeline = api.user_timeline(screen_name = username, count = 1, tweet_mode='extended', include_rts = False, include_entities=True, exclude_replies=True)
for tweet in theTimeline:
print(tweet.entities)
I am using the premium sandbox API, “search tweets: 30-days” feature. At least, I believe I am, but am not positive on how to convert from the standard API to the premium.