简体   繁体   English

instabot 错误,为什么我会收到这些错误以及如何解决?

[英]instabot ERROR, Why am I getting these errors and how to fix please?

I have written this to upload 10000 photos to Instagram, one each hour and whenever I run it I get these errors我写这个是为了将 10000 张照片上传到 Instagram,每小时一张,每当我运行它时,我都会收到这些错误

INFO - Instabot version: 0.117.0 Started信息 - Instabot 版本:0.117.0 已启动

INFO - Not yet logged in starting: PRE-LOGIN FLOW!信息 - 尚未登录开始:预登录流程!

ERROR - Request returns 429 error!错误 - 请求返回 429 错误!

WARNING - That means 'too many requests'.警告 - 这意味着“请求太多”。 I'll go to sleep for 5 minutes.我会 go 睡 5 分钟。

this is my code am I doing anything wrong?这是我的代码我做错了什么吗? Can someone please point it out and explain?有人可以指出并解释吗?

from instabot import Bot import time from instabot import Bot 导入时间

bot = Bot()机器人 = 机器人()

image = 1图像 = 1

bot.login(username="username", password="password") bot.login(用户名=“用户名”,密码=“密码”)

while image < 10000: photo = str(image) bot.upload_photo(f"{photo}.png") time.sleep(3600) image += 1而图像 < 10000: photo = str(image) bot.upload_photo(f"{photo}.png") time.sleep(3600) image += 1

You just need to go to api.py This is a file in this InstaBot library In case if you're using vscode editor then just ctrl+click on the last link shown in error logs in terminal of vscode您只需要将 go 到 api.py 这是此 InstaBot 库中的一个文件 如果您使用的是 vscode 编辑器,则只需 ctrl+单击 vscode 终端中错误日志中显示的最后一个链接

Then comment out the complete chunk of code starting from 559 to 585(complete if block) Now you're good to go然后注释掉从 559 到 585 的完整代码块(完整的 if 块)现在你对 go 很好

I don't see any problem with your code.我认为您的代码没有任何问题。

Error 429 and what it means: How can I bypass the 429-error from www.instagram.com?错误 429 及其含义: 如何绕过 www.instagram.com 中的 429 错误?

Long story short, you have probably made too many REQUEST, and Instagram is blocking you ( it could be that you tried this code once, without the time.sleep(3600) and resulted 10000 request )长话短说,您可能发出了太多请求,而 Instagram 阻止了您(可能是您尝试了此代码一次,没有 time.sleep(3600) 并产生了 10000 个请求)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么会出现这些错误以及如何解决它们? - Why am I getting these errors and how to fix them? 为什么我在尝试检查碰撞时会出现类型错误,我该如何解决? - Why am i getting Type errors when i am trying to check for collision and how can i fix it? 为什么我收到 JSON 错误,我该如何解决 - Why am I getting a JSON error and how do I fix it 为什么我会收到属性错误? 我该如何解决? - Why am I getting an attribute error? How can I fix it? 不知道为什么我收到这个错误,我有一个想法,但我不知道如何解决它 - Not sure why I am getting this error, I have an idea but am not sure how to fix it 我收到“SystemExit: 2”错误,如何修复 - I am getting 'SystemExit: 2' error , how to fix it 为什么我会收到“停止迭代”错误,我该如何解决? - Why am I getting the "stop iteration" error and how do I fix this? 为什么我在 Python 中收到 ValueError 以及如何修复它? - Why am I getting ValueError in Python and how can I fix it? 为什么我在视口内收到坐标的 MoveTargetOutOfBoundsException 异常? 怎么修? - Why am I getting a MoveTargetOutOfBoundsException for coordinates within the viewport? How to fix? 当我有 3.7 时“请升级 python”,当我有 20.0.2 时“请升级 pip”。 为什么我收到这个错误? - "Please upgrade python" when I have 3.7 and "Please upgrade pip" when I have 20.0.2. Why am I getting this error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM