python - Instagram 响应 HTTP 错误“429 - 请求过多”
问题描述
我不确定如何修复以下代码以克服速率限制。此外,即使我将 max_count 设置为 100,我也不确定为什么它会在 10 个帖子处停止。
代码:
import instaloader
loader= instaloader.Instaloader(download_comments=True,
download_videos=True,
download_geotags=True,
save_metadata=True)
loader.download_hashtag('fashion', max_count=100, fast_update=False, profile_pic=False)
问题是:
(base) mona@mona:~/research/insta-scrape$ python instaloader_tester.py
Retrieving pictures with hashtag #fashion...
[ 1/100] #fashion/2020-11-30_03-20-10_UTC.jpg [@___eshika__rao @ieshu_rao …] comments json
[ 2/100] #fashion/2020-11-30_03-04-22_UTC.jpg [would you let me ride shotgun…] comments json
[ 3/100] #fashion/2020-11-30_03-02-28_UTC.jpg [✨I bite back ✨]
HTTP redirect from https://www.instagram.com/graphql/query to https://www.instagram.com/accounts/login/
JSON Query to graphql/query: 429 Too Many Requests: redirected to login [retrying; skip with ^C]
Requests within last 10/11/20/22/30/60 minutes grouped by type:
other: 1 1 1 1 1 1
2b0673e0dc4580674a88d426fe00ea90: 3 3 3 3 3 3
* 97b41c52301f77ce508f55e66d17620e: 4 4 4 4 4 4
Instagram responded with HTTP error "429 - Too Many Requests". Please
do not run multiple instances of Instaloader in parallel or within
short sequence. Also, do not use any Instagram App while Instaloader
is running.
The request will be retried in 655 seconds, at 23:04.
解决方案
推荐阅读
- java - Webflux Mono - 继续运行直到完成
- asp.net-core - .Net Core 项目 Nuget Packages 无法恢复
- delphi - Delphi 7 和 Delphi Tokyo - 不同的结果相同的功能
- latex - 使用 xspace 生成非中断空间
- javascript - javascript marquee中的间距元素,使用php循环元素
- autodesk-model-derivative - Modelderivative 在轮询属性时返回 DNS 查找超时错误
- android - Android Studio 未知的 Unicode 字体?
- mysql - 在 sum 内计数时,按功能分组无效
- c# - 在数据库每分钟获取新数据的同时从数据库加载更多数据
- c# - 将xml复制到没有标题的新文件