We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be85721 commit c40fbfdCopy full SHA for c40fbfd
extract_tweets.py
@@ -0,0 +1,21 @@
1
+import tweepy
2
+
3
+consumer_key = "xxxxxxxxxx"
4
+consumer_secret = "xxxxxxxx"
5
+access_token = "xxxxxxxxx"
6
+access_token_secret = "xxxxxxxxxx"
7
+def get_tweets(username):
8
+ auth = tweepy.OAuthHandler(consumer_key,consumer_secret)
9
+ auth.set_access_token(access_token,access_token_secret)
10
+ api = tweepy.API(auth)
11
+ number = 200
12
+ tweets = api.user_timeline(screen_name = username)
13
+ tmp = []
14
+ tweets_for_csv = [tweet.text for tweet in tweets]
15
+ for j in tweets_for_csv:
16
+ tmp.append(j)
17
+ for i in tmp:
18
+ print(i)
19
20
+if __name__ == "__main__":
21
+ get_tweets("daviddobrik")
0 commit comments