我正在尝试将 Twitter API 的版本 2 与 tweepy 3.10.0 一起使用,但在遵循文档时我感到困惑,https://docs.tweepy.org/en/latest/client.html
当我尝试设置 API 时,如下例所示:
import tweepy
client = tweepy.Client(consumer_key=consumer_key,
consumer_secret=consumer_secret,
access_token=access_token,
access_token_secret=access_token_secret)
我收到此错误:属性错误:module 'tweepy' has no attribute 'Client'
我之前使用过 Tweepy,它适用于我配置的一些测试,但我需要使用版本 2,因为我想执行此版本 API 的一些功能。
我的错误是什么?
Tweepy.Client
对 Twitter API v2 的支持仍在 master 分支上开发。
它尚未发布,也不是 v3.10.0 的一部分,但将作为 v4.0 的一部分发布。
https://docs.tweepy.org/en/latest/是文档的最新开发版本。
有关 v3.10.0 的文档,请参阅https://docs.tweepy.org/en/v3.10.0/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)