Links

Post image and caption

Tags: #instagram #snippet #content
Author: Jeremy Ravenel​

Input

Import libraries

try:
from instabot import Bot
except:
pip install instabot --user
from instabot import Bot
import naas

Setup your Instagram

# Credentials
username = "USERNAME"
password = "PASSWORD"
​
# Instragram outputs
image_path = "demo.jpg"
caption = "Naas is doing this."

Model

Connect to your instagram account

bot = Bot()
bot.login(username=username,
password=password)

Output

Upload photo

bot.upload_photo(image_path,
caption=caption)