Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Last active October 5, 2023 15:23
Show Gist options
  • Save Abhayparashar31/24c71fa6670e85cfca6eea0d815dbff2 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/24c71fa6670e85cfca6eea0d815dbff2 to your computer and use it in GitHub Desktop.
from instabot import Bot
bot = Bot()
bot.login(username="", password="")
###### upload a picture #######
bot.upload_photo("yoda.jpg", caption="biscuit eating baby")
###### follow someone #######
bot.follow("elonrmuskk")
###### send a message #######
bot.send_message("Hello from Dhaval", ['user1','user2'])
###### get follower info #######
my_followers = bot.get_user_followers("dhavalsays")
for follower in my_followers:
print(follower)
####### Unfollow Everyone #######
bot.unfollow_everyone()
###### Upload An Image #######
file = open('image_path', 'r')
bot.upload_photo(file, caption="image_caption")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment