Upload images to instagram using Python

天涯浪子 提交于 2021-02-07 14:42:54

问题


I'm trying to do a simple Instagram python bot in order to upload images in my Instagram profile. I've already tried the most common libraries (InstagramAPI, instapy, insta-cly). While I was searching I found out that Instagram has changed something making those libraries useless.

Is there any library I can use? I know thatI can use Selenium in order to make it go but I'm wondering if there is any shortcut.

Trank you!


回答1:


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")


来源:https://stackoverflow.com/questions/62293200/upload-images-to-instagram-using-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!