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 : 

 

 

 

 

 

 

 

 

Share with your friends:

Ajith Jojo Joseph

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

HTML Form to Email Using JavaScript and SMTP server 🚀

Hello Everyone, 🙋‍♂️ In this tutorial, we are going to look at how to send emails from HTML Form to […]

22 September, 2021

How to make pretty URL in PHP using .htaccess

Hello Everyone, Here in this tutorial, you will learn How to make a pretty URL in PHP using .htaccess. and […]

18 September, 2021

Submit Form Without Refreshing Page PHP and Javascript

Hello Everyone, In this tutorial, we are going to learn, How to submit a form without reloading. yeah, that’s so […]

HTML from to Email using SMTP in PHP with Source code

Hello Everyone, In this tutorial, I am going to teach you how to send an email from an HTML form […]

16 September, 2021

Newsletter

Subscribe to our weekly Newsletter and stay tuned.


Free PHP Invoicing Software

Gmax CRM Lite is an Invoicing and project management tool for small businesses, features including client management , invoicing , quotation and project management

Download for free