【发布时间】:2021-08-30 20:37:45
【问题描述】:
我正在尝试将 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)
我收到此错误:AttributeError: module 'tweepy' has no attribute 'Client'
我之前使用过 Tweepy,它适用于我配置的一些测试,但我需要使用版本 2,因为我想执行此版本 API 的一些功能。
我的错误是什么?
【问题讨论】: