推特机器人

1
2
3
4
5
6
7
8
import tweepy
client = tweepy.Client(
consumer_key="填你的consumer_key",
consumer_secret="填你的consumer_secret",
access_token="填你的token",
access_token_secret="填你的token_secret"
)
client.create_tweet(text=str('py测试'), user_auth=True)

引用:
tweepy中文文档
https://www.tweepy.cn/client.html#tweepy.Client