Advertisement
oort77

Instagram bot

Aug 28th, 2022
2,886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. from instabot import Bot
  2. bot = Bot()
  3. bot.login(username="", password="")
  4.  
  5. ######  upload a picture #######
  6. bot.upload_photo("yoda.jpg", caption="biscuit eating baby")
  7.  
  8. ######  follow someone #######
  9. bot.follow("elonrmuskk")
  10.  
  11. ######  send a message #######
  12. bot.send_message("Hello from Dhaval", ['user1','user2'])
  13.  
  14. ######  get follower info #######
  15. my_followers = bot.get_user_followers("dhavalsays")
  16. for follower in my_followers:
  17.     print(follower)
  18.  
  19. ####### Unfollow Everyone #######
  20. bot.unfollow_everyone()
  21.  
  22. ###### Upload An Image #######
  23. file = open('image_path', 'r')
  24. bot.upload_photo(file, caption="image_caption")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement