I have this portion of code: use (Tweepy)
firstTweet = api.user_timeline('twitter')[0]
print(firstTweet.text)
print(firstTweet.id)
results = api.retweets(firstTweet.id)
print(results)
When I get the result I get the following:
[Status (possibly_sensitive = False, in_reply_to_user_id = None, contributors = None, retweeted = False, retweet_count = 77, favorite_count = 0, created_at = datetime.datetime (2016, 2, 2, 12, 56, 25), text = 'RT @twitter: Follow conversation about #iCaucused live as the results come in: link link ', place = None, lang =' en ', entities = {' symbols ': [],' urls ': [{' display_url ':' twitter.com/search?q =% 23iC ... ',' expanded_url ':' link ',' url ':' link ',' index ': [79, 102]}, {' display_url ':' twitter.com/gov/status/694... ',' expanded_url ':' link ',' url ':' link ',' indices': [103, 126]}], 'user_mentions': [{' id_str ':' 783214 ',' screen_name ':' twitter ',' id ': 783214, 'name': 'Twitter', 'index': [3, 11]}], 'hashtags': [ {'text': 'iCaucused', 'indices': [39, 49]}]}, user = User (profile_image_url =' link ', is_translator = False, profile_banner_url =' link ', description =' ' , contributors_enabled = False, screen_name = 'abdulazeeznima2', profile_image_url_https = ' link .....
Short for space reasons ...
I am getting information on who has done RT (or who) .... now how do I access each of the items?
Example:
Who gave RT?
What is your screen_name
?
Do you have GEO
activated?
Thanks to everyone!
Another question ... why is that json
(if it is) malformed and where and how can I format it correctly to display it in an orderly manner?