instagram login bot python code example

Example 1: python instagram bot

from instapy import InstaPy

session = InstaPy(username="<your_username>", password="<your_password>")
session.login()
session.like_by_tags(["bmw", "mercedes"], amount=5)
session.set_dont_like(["naked", "nsfw"])
session.set_do_follow(True, percentage=50)
session.set_do_comment(True, percentage=50)
session.set_comments(["Nice!", "Sweet!", "Beautiful :heart_eyes:"])
session.end()

Example 2: instabot login python

from instabot import Bot

bot = Bot()
m = bot.login(username='Enter user name', password='Enter Password')
print(m)