Code Monkey home page Code Monkey logo

py-insta-bot-with-unfollows's Introduction

py-insta-bot-with-unfollows

Tutorial/Explanation article

An Instagram bot written in Python that does the following:

  • Browsing specified hashtags and liking random posts
  • Following posters of these posts
  • Keeping track of followed users and unfollowing them after a specified number of days
  • Allows for customization of settings through a single .json file

Requirements

The following libraries are required for the bot to work:

  • PyHamcrest
  • mysql-connector
  • selenium

The bot needs to connect to a database to store and query the users. The database name can be changed from settings.json.

The bot requires one table called followed_users within the database with two fields (username, date_added)

Installation

  1. Fill in the missing information in settings.json
  2. Change line 4 in InstaBot.py to include your chromedrive path
  3. run InstaBot.py:
python InstaBot.py

Settings

"config": {
    "days_to_unfollow": 1,
    "likes_over": 150,
    "check_followers_every": 3600,
    "hashtags": []
  }

days_to_unfollow: number of days before unfollowing users

likes_over: ignore posts if the number of likes is above this number

check_followers_every: number of seconds before checking if it's time to unfollow any of the users

hashtags: a list of strings with the hashtag names the bot should be active on

py-insta-bot-with-unfollows's People

Contributors

ibra0203 avatar

Watchers

James Cloos 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.