Post Photo

To post photos on Instagram use we need to check whether the photo is in the given ratio. If the photo is not in the given ratio we need to resize it. The simplest ratio is 1:1.

Python3




from instabot import Bot
 
bot = Bot()
bot.login(username="your_username",
          password="your_password")
 
# Post photos
# Photos need be resized and, if not in ratio given below.
# jpg format works more better than others formats.
# Acceptable Ratio of image:-  90:47, 4:5, 1:1(square image).
# Keep image and program in same folder.
# -----------------------------------------------------------
bot.upload_photo("filename.jpg", caption="Write caption here.")


Output:



How to Make an Instagram Bot With Python and InstaBot?

In this article, we are going to see how to make an Instagram bot using Python and InstaBot.

Bots are really common these days to send messages, upload photos, send wishes, and many more things.  Bots reduce our work, save time. Today we are creating an Instagram bot that can do the following things. 

Similar Reads

Functions performed by the bot

Follow one or more of friends. Unfollow one or a list of persons. Unfollow everyone. Count the number of followers of any user. Send messages to followers or a list of followers. Send like on chat. Post photos....

Login

Before performing any of the login() functions we need to import instabot library and login first....

Follow

...

Unfollow

To follow one friend we can use follow() function....

Unfollow everyone

...

Count the number of followers

...

Send messages

To unfollow one person we will use unfollow() function....

Send Like messages

...

Post Photo

...