How to create Instagram Bot with InstaPy

Hello everyone,

Today we are going to learning how we can make an Instagram bot with InstaPy. InstaPy is a python package, and we can use this to automate our Instagram account,

It will like posts , comment, follow people, unfollow people, and lots more

In this tutorial, we are trying to test some of its abilities,¬† Sounds good ah ?¬† let’s get into it.

Requirements 

  1. Firefox Browser  (link)
  2. Python  (install  stable version)  (link)
  3. a Code Editor (link)

 

Create a folder and open PowerShell in it and run the command

Install InstaPy (in the PowerShell or cmd):

pip install instapy

If you get an error with the previous command:

py -3 -m pip install instapy

Create a file called instabot.py (u can name it whatever you want) in the folder

# imports
from instapy import InstaPy
from instapy import smart_run

# login credentials
insta_username = 'your username'  # <- enter username here
insta_password = 'yourpassword'  # <- enter password here

# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=False)

with smart_run(session):
    """ Activity flow """
    # general settings
    session.set_relationship_bounds(enabled=True,
                                    delimit_by_numbers=True,
                                    max_followers=1000,
                                    min_followers=45,
                                    min_following=77)
    #find 10 profiles with these tags  
    session.like_by_tags(["programming", "#code"], amount=10)

    #follow them all 
    session.set_do_follow(True, percentage=100)

Run the script: open the same powershell then run

py instabot.py

then it will launch a firefox browser and it will automatically find matching profiles and like images and follow people

to know more watch the video



Download Source Code : 

 

 

 

 

 

 

 

 

Post Your Questions on our forum

Post a question on Forum

Ajith Jojo Joseph

Self taught, dedicated young entrepreneur with many licensed products under his sleeve. Passionate about technology, business and excellence in general.

Share with your friends:

Leave a Reply

Your email address will not be published.

Automate WhatsApp messages using python in 2 lines of code

Hello everyone,¬† in this video we are going to make a WhatsApp automation script. so you can send WhatsApp msg […]

September 11, 2021

Build your own Free Audio Book from PDF using Python

Hello everyone, In this tutorial, we are going to make an Audiobook from PDF using python.¬† As we know we […]

September 11, 2021

Download Instagram profile data with Python 3 Lines of code

Hello everyone, In this tutorial, we are going to download all the information including profile pics, posts, tags everything from […]

September 11, 2021

How to create Instagram Bot with InstaPy

Hello everyone, Today we are going to learning how we can make an Instagram bot with InstaPy. InstaPy is a […]

March 31, 2021

Digital Marketing Toolkit

Get Free Access to Digital Marketing Toolkit. You can use all our tools without any limits

Get Free Access Now