Python中文
首页
教程
问答
标签
搜索
登录
注册
tweepy(python):速率限制超过代码88
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在用tweepy编写一个tweepy应用程序,它通过查看in_reply_to_status_ID来爬过tweets。 一切正常到限速,几分钟后,我还要再等15分钟左右。在</p> <p>这很奇怪,因为我使用了几乎相同的代码,直到几个月前,在api1.0被弃用之前,它没有速率限制问题。在</p> <p>有没有什么办法可以让我摆脱,或者至少提高利率限制? 或者有解决办法吗?在</p> <p>好像很多人都有这个问题,但找不到一个明确的解决办法。。在</p> <p>如果你能帮忙,我将不胜感激。在</p> <pre><code>auth1 = tweepy.auth.OAuthHandler('consumer_token','consumer_secret') auth1.set_access_token('access_token','access_secret') api=tweepy.API(auth1) def hasParent(s): #return true if s is not None, i.e., s is an in_reply_to_status_id numbe .... while hasParent(ps): try: parent=api.get_status(ps) except tweepy.error.TweepError: print 'tweeperror' break newparent = parent.in_reply_to_status_id ...... ps=newparent </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>这是因为你达到了最大限度。只需断开网络连接,然后重新连接,无需等待。 使用光标:</p> <p><code>statuses = tweepy.Cursor(api.user_timeline).items(2)</code></p> <p>如果您再次出现错误,只需减少项目。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
无法使用Django/mongoengine连接到MongoDB(身份验证失败)
6 回答
无法使用Django\u mssql\u后端迁移到外部hos
6 回答
无法使用Django&Python3.4连接到MySql
9 回答
无法使用Django+nginx上载媒体文件
3 回答
无法使用Django1.6导入名称模式
5 回答
无法使用Django1.7和mongodb登录管理站点
7 回答
无法使用Djangoadmin创建项目,进程使用了错误的路径,因为我事先安装了错误的Python
5 回答
无法使用Djangockedi验证CBV中的字段
3 回答
无法使用Djangocketditor上载图像(错误400)
5 回答
无法使用Djangocron进行函数调用
1 回答
无法使用Djangofiler djang上载文件
5 回答
无法使用Djangokronos
4 回答
无法使用Djangomssql provid
9 回答
无法使用Djangomssql连接到带有Django 1.11的MS SQL Server 2016
9 回答
无法使用Djangomssq迁移Django数据库
1 回答
无法使用Djangonox创建用户
5 回答
无法使用Djangopyodb从Django查询SQL Server
5 回答
无法使用Djangopython3ldap连接到ldap
5 回答
无法使用Djangoredis连接到redis
3 回答
无法使用Django中的FK创建新表
2 回答