Skip to content

Commit b2e9db1

Browse files
authored
Create first_twitter_bot.py
1 parent 0702252 commit b2e9db1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

first_twitter_bot.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import tweepy
2+
consumer_key ="somevalue"
3+
consumer_secret ="somevalue"
4+
access_token = "somevalue"
5+
access_token_secret = "somevalue"
6+
7+
8+
9+
auth =tweepy.OAuthHandler(consumer_key, consumer_secret)
10+
11+
auth.set_access_token(access_token, access_token_secret)
12+
13+
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True,compression=True)
14+
15+
username="vueron_ai"
16+
usr_main=api.get_user(username)
17+
18+
follower_num =usr_main.followers_count
19+
20+
friend_num=usr_main.friends_count
21+
print("followers:",follower_num)
22+
23+
print("friends:",friend_num)

0 commit comments

Comments
 (0)