问题
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