Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from twitter import *
- #pip install twitter
- config = {
- consumer_key = "XxXxXxxXXXxxxxXXXxXX",
- consumer_secret = "xXXXXXXXXxxxxXxXXxxXxxXXxXxXxxxxXxXXxxxXXx",
- access_key = "XXXXXXXX-xxXXxXXxxXxxxXxXXxXxXxXxxxXxxxxXxXXxXxxXX",
- access_secret = "XxXXXXXXXXxxxXXXxXXxXxXxxXXXXXxXxxXXXXx",
- }
- twitter = Twitter(auth = OAuth(config["access_key"], config["access_secret"], config["consumer_key"], config["consumer_secret"]))
- users = ["1","2","3","4"]
- for user in users:
- results = twitter.statuses.user_timeline(screen_name = user)
- for status in results:
- print "@%s %s" % (user, status["text"])
- retweets = twitter.statuses.retweets._id(_id = status["id"])
- for retweet in retweets:
- print " - retweeted by %s" % (retweet["user"]["screen_name"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement