Advertisement
cqwrcqwrcqwrcqw

b3m

Dec 31st, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. from twitter import *
  2. #pip install twitter
  3.  
  4.  
  5.  
  6.  
  7.  
  8. config = {
  9. consumer_key = "XxXxXxxXXXxxxxXXXxXX",
  10. consumer_secret = "xXXXXXXXXxxxxXxXXxxXxxXXxXxXxxxxXxXXxxxXXx",
  11. access_key = "XXXXXXXX-xxXXxXXxxXxxxXxXXxXxXxXxxxXxxxxXxXXxXxxXX",
  12. access_secret = "XxXXXXXXXXxxxXXXxXXxXxXxxXXXXXxXxxXXXXx",
  13.  
  14. }
  15.  
  16.  
  17. twitter = Twitter(auth = OAuth(config["access_key"], config["access_secret"], config["consumer_key"], config["consumer_secret"]))
  18. users = ["1","2","3","4"]
  19. for user in users:
  20. results = twitter.statuses.user_timeline(screen_name = user)
  21. for status in results:
  22. print "@%s %s" % (user, status["text"])
  23. retweets = twitter.statuses.retweets._id(_id = status["id"])
  24. for retweet in retweets:
  25. print " - retweeted by %s" % (retweet["user"]["screen_name"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement