Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. {"created_at":"Sat Apr 22 07:28:47 +0000 2017","id":855684794939842560,"id_str":"855684794939842560","text":"#PL | FIXTURES - 22 April 2017 nWest Ham v Everton 16:00nHull v WatfordnSwansea v Stoke nBournemouth v Middlesbrough #CCFMSport","source":"u003ca href="http://twitter.com" rel="nofollow"u003eTwitter Web Clientu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":256051042,"id_str":"256051042","name":"Ayanda Frances Felem","screen_name":"AyandaFelemZA","location":"Cape Town, South Africa","url":"http://ccfm.org.za","description":"Sports Producer/Reporter for @RadioCCFm, Views are my own. ayanda@ccfm.org.za","protected":false,"verified":false,"followers_count":446,"friends_count":1648,"listed_count":23,"favourites_count":1625,"statuses_count":16110,"created_at":"Tue Feb 22 15:15:38 +0000 2011","utc_offset":7200,"time_zone":"Pretoria","geo_enabled":true,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http://abs.twimg.com/images/themes/theme11/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme11/bg.gif","profile_background_tile":false,"profile_link_color":"DD2E44","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"000000","profile_text_color":"000000","profile_use_background_image":false,"profile_image_url":"http://pbs.twimg.com/profile_images/850335374446665728/BvVIo7oB_normal.jpg","profile_image_url_https":"https://pbs.twimg.com/profile_images/850335374446665728/BvVIo7oB_normal.jpg","profile_banner_url":"https://pbs.twimg.com/profile_banners/256051042/1491570881","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"PL","indices":[0,3]},{"text":"CCFMSport","indices":[117,127]}],"urls":[],"user_mentions":[],"symbols":[]},"favorited":false,"retweeted":false,"filter_level":"low","lang":"en","timestamp_ms":"1492846127625"}
  2.  
  3. import json
  4.  
  5.  
  6. tweets_data_path = 'twitter_streaming.txt'
  7.  
  8. tweets_data = []
  9. tweets_file = open(tweets_data_path, "r")
  10.  
  11. json_load = json.load(tweets_file)
  12. texts = json_load['text']
  13. coded = texts.encode('utf-8')
  14. s = str(coded)
  15. tweets_data.append(s[1:-2))
  16. print tweets_data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement