- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 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:模块“tweepy”没有属性“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/ .
关于python - Tweepy 3.10.0,属性错误: module 'tweepy' has no attribute 'Client' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67978717/
有人知道如何使用 tweepy 模块中的 search_full_archive 功能吗?我使用了类似于常规搜索的光标功能,但它不起作用。 import tweepy as tw api_key =
有人知道如何使用 tweepy 模块中的 search_full_archive 功能吗?我使用了类似于常规搜索的光标功能,但它不起作用。 import tweepy as tw api_key =
我正在使用此功能从 id 获取所有关注者: def getAllFollowers(id): followers = tweepy.Cursor(api.followers, id = id)
我在 Anacondas Python 3.3 中安装 Tweepy 时遇到问题。 首先,我转到了 Python 3.3 安装的脚本目录。然后我跑了 easy_install tweepy 如果我在默
当我尝试使用 tweepy 进行 Twitter 身份验证时,出现以下错误。 File "/usr/local/lib/python2.7/dist-packages/tweepy/models.
我安装了 pip install tweepy 并且安装没有错误。 Requirement already satisfied: tweepy in /Library/Python/2.7/site-
我在 PyCharm ed 4 中编写了这个 tweepy 源代码。 from __future__ import absolute_import, print_function from tweep
我在尝试在我的代码中导入 tweepy 库时遇到问题,我尝试卸载它然后重新安装它,但我仍然遇到同样的问题。 这是我的代码(错误)和命令行: 谢谢。 最佳答案 Tweepy 还不适用于 python 3
我正在尝试获取用户的 friend 并将他们附加到给定条件的列表中: for friend in tweepy.Cursor(api.friends).items(): if friend n
我正在尝试将 Twitter API 的版本 2 与 tweepy 3.10.0 一起使用,但在遵循文档 https://docs.tweepy.org/en/latest/client.html 时
通过应用 tweepy.Cursor 和 api.search 方法(如下所示),Tweepy 在提取我需要的所有其他信息(主题标签除外)方面做得很好。我从文档中知道 Hashtags 在这个结构状态
TheStreamer.filter(languages=["en"], track=['Bruno Mars is lovely']) 有没有办法让它跟踪一个确切的短语,而不是相关的短语?例如, '
我有以下代码 api = tweepy.API(auth,wait_on_rate_limit=True) for tweet in tweepy.Cursor(api.search,
我最近一直在玩 tweepy,我试图拉动给定用户的关注者和关注者。 followingids = [] followids = [] userid = "Someone"#sets target
我想提取所有国家/地区的所有阿拉伯语推文。 我修改了这个 tutorial中的代码。这是我的搜索查询。api.search(q="*", count=tweetsPerQry, lang ['ar']
我想提取所有国家/地区的所有阿拉伯语推文。 我修改了这个 tutorial中的代码。这是我的搜索查询。api.search(q="*", count=tweetsPerQry, lang ['ar']
当我尝试调用一些方法(例如 show_friendship)时,我收到错误 raise TweepError(error_msg, resp, api_code=api_error_code) twe
我正在使用 tweepy 访问大量推文。许多推文都被截断了,所以我想获取一些推文的全文,我有这些推文的 id。 我的问题是:tweepy api 实例有一种一次下载多条推文的方法 (api.statu
我正在尝试让我的机器人能够通过搜索 API 搜索多个关键字。到目前为止我已经: f = open('swear.txt', 'r') search = f.read().splitlines() f.
我想跟踪特定主题标签的所有推文,但我只需要带有地理位置的推文。此行无法正常工作,结果都是带有地理位置的推文。 stream.filter(track=["hashtag"],locations = G
我是一名优秀的程序员,十分优秀!