【发布时间】:2020-05-08 18:43:12
【问题描述】:
我知道之前有人问过这个问题,但既然已经问了这么久,我会再问一次,我可以通过 InstagramAPI 自动将图片上传到 Instagram,如果没有,还有其他安全的方法吗? (最好使用python),我的日程很忙,没有足够的时间发布图片,所以我想自动化这个过程。 这是我尝试使用 instapy-cli 的方法
from instapy_cli import client
username = 'my_username'
password = 'my_password'
image = 'image.jpg'
text = 'test caption'
with client(username, password) as cli:
cli.upload(image, text)
这是错误
[IG] not found cookie/cookie_file >> login as default
Error is >>
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Bad Request
Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli
Traceback (most recent call last):
File "C:/Users/firmi/.PyCharmCE2018.1/config/scratches/Projects/test.py", line 12, in <module>
cli.upload(image, text)
File "C:\Users\firmi\PycharmProjects\MyProjects\venv\lib\site-packages\instapy_cli\cli.py", line 153, in upload
raise IOError("Unable to upload.")
OSError: Unable to upload.
我尝试过使用“instabot”、“InstagramAPI”、“instagram-private-api”等
【问题讨论】:
-
尝试时会发生什么?
-
你到底是什么意思?我尝试了一些声称具有上传照片功能的库,但它们都只是返回错误。
-
您好,向我们展示您的尝试。提供一些代码来帮助我们分析你哪里做错了。
标签: python python-3.x instagram instagram-api