Giter Club home page Giter Club logo

instagram-bot's Introduction

๐Ÿค–Z-foll

A small python bot/ set of scripts that automates the process of login in to IG via facebook . Send follow requests from the suggestions tab . Unfollow people . Download pictures from a given public profile

How to use

  • Install
pip install selenium
  • Download
Get your chrome driver from this website :

๐Ÿ‘‰ ChromeDriver ๐Ÿ‘ˆ


If you're using windows , you may want to put the .exe in the same folder as the script.

If you're using macOs , just move it to /usr/local/bin

I haven't tested it on linux, but i bet it's the same as macOs ...

Functionalities

Functionalities implemented so far :

LOGIN โœ”๏ธ
FOllOW โœ”๏ธ
UNFOLLOW โœ”๏ธ
DOWNLOAD POSTS โœ”๏ธ

Follow How it works & possible optimisation :

The logic i used is :

The script opens up the 'ALL SUGGESTIONS TAB' then loads few of those suggestions

Then goes through the first 30 accounts and follows them.

Once it's done , it refreshes the page then repeat.

It won't stop until you stop the script .

You can optimise this by changing the number , i think a full page loaded displays up to 140 profiles.

if(x == 30):
              self.driver.refresh()
              ZTF.follow(self)

Unfollow How it works & possible optimisation :

Basicaly just like the follow part

I only unfollow 11 at a time , for some reason, if higher it results in a crash.

You can optimise this by changing the number.

BUT you need to figure out a way to scroll through everything

 if(K == 11):
      closemod = self.driver.find_element_by_xpath('/html/body/div[4]/div/div[1]/div/div[2]/button')
      closemod.click()
      ZTF.mylist(self)

Download Posts (pics only)

Given a profile , the script will acces it , load up the first 32 posts , get their links .
Then download the pictures .
There's a margin of error here , since some posts disapear from the code when they leave the view.
That's why i'm only able to grab the 32 first ones.

Credentials

As any other file containing sensitive data, credentials.py contains :
login = 'PHONE_EMAIL_OR_USERNAME'
pwd = 'PASSWORD'
profile ='elonmusk'
Make sure to change that .

LIMITATIONS :

The script bugs out from time to time depending on your internet speed .
The quality is shit , i made this while learning so excuse my n00bish mistakes .

The function SLEEP() , has high intervals because of my 3rd world internet , ๐Ÿ’› 4mbps ๐Ÿ’› .
You should adapt it to your needs .

Support

Any help improving this and adding more stuff is welcome ! .

Contact me

you can contact me at [email protected] or via my portfolio

License

๐Ÿค–Z-foll released under the MIT License.

Made with ๐Ÿ’˜ by a ๐Ÿ‘จโ€๐Ÿ’ป on a ๐Ÿ’ป | 2020 | ZTF666

instagram-bot's People

Contributors

ztf666 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.