· 6 years ago · Jun 20, 2019, 01:46 PM
1import tweepy
2
3def download_tweets():
4
5 CONSUMER_KEY = "consumer key"
6 CONSUMER_SECRET = "consumer secret"
7 OAUTH_TOKEN = "auth token"
8 OAUTH_TOKEN_SECRET = "auth token secret"
9
10 auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
11 auth.set_access_token(OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
12 api = tweepy.API(auth)
13
14 tweets_IDs = [434828570574479360, 434828682352672768, 434828730394230784, 434828787793276928, 434828917174992896, 434829014013067265, 434829430746537985, 434829430746537985, 434829552742068224]
15
16 for id in tweets_IDs:
17 tweet = api.get_status(tweet_id)
18 print(tweet)