0

我想使用 python 在 Instagram 上发布一张图片,但我不知道该怎么做。提前致谢。我这样做

但这是失败的

from instapy_cli import client
def post_instagram():
    capture()
    username = 's' 
    password = '' 
    image = 'photo.png'
    speak("what is the caption?")
    caption = command()
    text = "nice"
    with client(username, password) as cli:
        cli.upload(image, text)
4

1 回答 1

0

删除 capture()caption= command()并且您的代码可以正常工作。像这样

from instapy_cli import client

username = ' YOUR USERNAME'
password = 'YOUR PASSWORD'
image = 'image.jpg'
text = "nice"

with client(username, password) as cli:
    cli.upload(image, text)

于 2020-08-22T11:30:43.970 回答