GithubHelp home page GithubHelp logo

tktk-ml / pyinstabot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nschaetti/pyinstabot

0.0 0.0 0.0 51.88 MB

A Instagram Bot using Deep Learning methods written in Python. PyInstaBot can find interesting people to follow and post new contents on a scheduled time after applying filters.

License: GNU General Public License v3.0

Python 100.00%

pyinstabot's Introduction


An Instagram bot and library written in Python to publish content automatically.

Join our community ! Chat with us on Gitter and join the Google Group to collaborate with us.

This repository consists of:

  • config : Configuration file management;
  • data :
  • db : MySQL database management;
  • docs : Documentation;
  • executor : Function and objects to execute actions;
  • filters : Function and objects for image filters ;
  • friends : Function and objects to manage friends and followers;
  • hashtags : Function and objects to manage hashtags ;
  • instagram : Function and objects for Instagram ;
  • instagramAPI : The instagram API ;
  • learning : Functions and objects for image and text classification ;
  • media : Functions and objects to manage medias ;
  • patterns : Object patterns ;
  • tools : Tools;

Authors

License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

Configuration

Configuration file

pyInstaBot takes its configuration in a JSON file which looks as follow :

{
    "instagram" :
	{
        "username": "",
        "password": "",
		"data_path": ""
    },
	"scheduler" :
	{
		"sleep": [6, 13]
	},
	"hashtags":
	[
	],
	"friends" :
	{
		"max_new_followers" : 40,
		"max_new_unfollow" : 40,
		"interval" : [30, 45],
		"ratio" : 0.8
	},
	"post":
	{
		"post_interval": [30, 90],
		"like_interval": [0, 4],
		"comment_interval": [0, 8],
        "max_posts": 24,
        "max_likes": 700,
        "max_comments": 300,
		"languages": ["en", "fr"],
		"comments": ["Nice!", "Nice feed!", "Keep going", "Good work", "๐Ÿ‘Š๐Ÿป๐Ÿ˜Ž", "๐Ÿ˜…๐Ÿ˜…๐Ÿ˜…", "โคโคโคโค", "Nice! ๐Ÿ˜…๐Ÿ˜…๐Ÿ˜…", "Keep going ๐Ÿ˜…๐Ÿ˜…๐Ÿ˜…"]
	},
	"forbidden_words" :
	[
	]
}

Their is two required sections :

  • Database : contains the information to connect to the MySQL database (host, username, password, database)
  • Instagram : contains the information for the Twitter API (auth and access tokens)

Command line

Launch executors

pyInstaBot launch an executor thread for each action type. You can launch the executor daemon that way :

python -m pyInstaBot execute --session session_public.json --config nilsbot.json

Find post to like

To find post to like :

python -m pyInstaBot find-likes --session session_public.json --config nilsbot.json --model .

Find post to comment

To find post to comment :

python -m pyInstaBot find-comments --session session_public.json --config nilsbot.json --model .

Find users to follow

To find new users to follow :

python -m pyInstaBot find-follows --session session_public.json --config nilsbot.json --model .

Find users to unfollow

To find obsolete users to unfollow :

python -m pyInstaBot find-unfollows --session session_public.json --config nilsbot.json --model .

Update friends

To update the list of friends in the database :

python -m pyInstaBot friends --session session_public.json --config nilsbot.json --update

Add medias

To add all medias in a directory with a common caption :

python -m pyInstaBot medias --session session_public.json --config nilsbot.json --add ~/images/ --caption ~/images/caption --loop

The loop argument will repost the medias multiple time. To add only one image :

python -m pyInstaBot medias --session session_public.json --config nilsbot.json --add ~/images/im.jpg --caption ~/images/caption --loop

Development

Files

pyinstabot's People

Contributors

nschaetti 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.