Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwaltr93 committed Mar 31, 2021
1 parent 8e1d2f7 commit 10f9e16
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,66 @@ Bot for Instagram based on Selenium.

Logins, adds Following, Removes Following if not followed back after waiting N days and Collects statistics !, just like most Instagram users do.

```
# to run script
python3 InstaBot.py
```

#### Configuring the bot using config.json

Bot behaviour and user account details can be controlled using json file, key-value pairs are self explainatory. currently password is specified in plain text, this will be improved in further commits.

config.json
```
{
"username": "username",
"password": "password",
"headless": "True",
"add_following" : "True",
"random_add" : "True",
"max_follower_add" : 10,
"remove_following" : "True",
"days_to_wait" : 6
}
```

**headless** - this controls whether browser should run in Full GUI or not.

**add_following** - set this to "True" if you want to add followers next time the script runs.

**random_add** - usually following are added linearly as shown in the explore page, if following to add is a large number(controlled using max_follower_add) this marks your account as a bot, so to avoid this set this to "True".

**max_follower_add** - number of following to add from explore page, if random_add is set "True", this number is used as a upper limit to generate a random max_follower_add.

**removed_following** - if set to "True", checks if days_to_wait has elapsed, and removes following of the users cached in cache pickle file.

**days_to_wait** - number of days to wait after added following to remove the users if not followed back.

TODO :
### Running as anacron job

- [ ] Update logic for scrolling down in explore page
The whole idea of this project being if just adding and removing following after N days will get you followers. since thats what most users do to get people followng them aka mutual following.
running this script daily to achieve above mentioned task can be tedious, thats where anacron comes to play.

**modfiying /etc/anacrontab**

```
<days> <delay> <job-id> python3 /home/<sys_user>/<path_to_InstaBot_directory>
```

**days** - 1, 7, 30 for daily weekly and monthly requirements

**delay** - minutes of delay before running after system startup

**job-id** - unique job-id, choose one which does not conflict with existing system anacron jobs.

### Adding new behaviours

Adding new behaviours is simple as defining new routines and calling them from "\__main\__" following existing methods to log any info or errors, ex: for removing all followers at once. any contributions and feedback are welcome :^).

## TODO :

- [x] Update logic for scrolling down in explore page

- [ ] Update logic to use one function for scrolling

- [x] add anacron file/Instructions

0 comments on commit 10f9e16

Please sign in to comment.