且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Python将图片上传到instagram

更新时间:2023-01-02 21:33:29

尝试该库:instabot https://pypi.org/project/instabot/

try this library: instabot https://pypi.org/project/instabot/

用于上传图片的代码示例:

example of code for uploading an image:

from instabot import Bot

bot = Bot()
bot.login(username="instagram_username", password="your_password")

file = open('path_to_your_image', 'r')
bot.upload_photo(file, caption="your post caption")