edouardthom / InstaBot

A data-centric bot to monitor your Instagram audience and expand it.
11 stars 2 forks source link
bot data instabot instagram instagram-bot

InstaBot 🤖

Instagram audience expansion and monitoring

Features
Get started with the bot - tutorial
Next steps
Code organisation

Features :

More concretely, what does the bot (MVP) do ?

Get started with the bot - tutorial

1. Set-up the environment

You need :

If you run in a terminal, you will be able to follow what the bot is doing with the logs :

Alt text

Every morning and evening you will receive a polite email containing insights (parameters in config.xml) :

Alt text

You'll also receive bug reports :

Alt text

About the data generated

The bot (MVP) generates 3 datasets at the moment (including the one containing the logs). The datasets are stored as csv in the InstaBot/database folder.
The schema and description of each dataset is defined in the class registeredTableDefinitions in the instabot_data_api.csv file. There you can see exactly what data the bot outputs, and what it contains.

About the maintenance

The bot is designed to overcome minor errors and keep running. From time to time it can crash but that should remaine relatively rare.
It is a good practice to regularly have a look at the logs to spot recurring minor errors and fix them.
By default the logs will be printed, and be stored in InstaBot/database/logs_X.csv for user X.
Bug reports will be sent as well via email.
One specific kind of eror occurs when the bot fails to interact (click, enter text,...) with the Instagram UI. It often happens when the source code of Instagram changed, and the bot cannot find a component (button,...) anymore.
The UI API (instagram_ui_api.py) ensures a frictionless management of the interactions with the UI. All components that the bot interacts with are declared in the registeredUIComponents class.
If you see often logs like "failed to click component X" , you might need to update its xpath in the class registeredUIComponents in instabot_ui_api.py.

Next steps

1st : elaborate an efficient way to monitor the bot and fix/improve it effortlessly.
The bot is currently running on several accounts, gathering data.
Next : leverage the data produced by the bot for audience targetting.