Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. url = "https://api.twitter.com/1.1/search/tweets.json"
  2.  
  3. params = {'q' : "keyword", 'count' : 10, 'lang' : 'ja'}
  4.  
  5. req = tw.get(url, params=params)
  6.  
  7. if req.status_code == 200:
  8. tweets = json.loads(req.text)
  9. for tweet in tweets['statuses']:
  10. print(tweet['text'])
  11. print("<<<<<<<<<<<<<<<<<<<<<<")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement