Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Update to v3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Mishchenko committed Nov 29, 2020
1 parent 4bfaee5 commit 51ae217
Show file tree
Hide file tree
Showing 32 changed files with 997 additions and 211 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.idea
interacted_users.*
scrapped_users.json
filtered_users.json
sessions.json
targets.txt
*.pyc
Expand Down
51 changes: 30 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ _IMPORTANT: if you previously used v2.x.x, then insomniac.py file will conflict
5. Type `adb devices` in terminal. It will display attached devices. There should be exactly one device. Then run the script (it works on Python 3):
6. Open Terminal / Command Prompt in the folder with downloaded [start.py](https://raw.githubusercontent.com/alexal1/Insomniac/master/start.py) (or type `cd <path-to-start.py>`) and run
```
python3 start.py --interact @natgeo
python3 start.py --interact @natgeo-followers
```
Make sure that the screen is turned on and device is unblocked. You don't have to open Instagram app, script opens it and closes when it's finished. Just make sure that Instagram app is installed. If everything's fine, script will open `@natgeo`'s followers and like their posts.

### Usage example
Say you have a travel blog. Then you may want to use such setup:
```
python3 start.py --interact @natgeo amazingtrips --interactions-count 20-30 --likes-count 1-2 --follow-percentage 80 --repeat 160-220
python3 start.py --interact @natgeo-followers amazingtrips-recent-likers --interactions-count 20-30 --likes-count 1-2 --follow-percentage 80 --repeat 160-220
```
Or just download a config file [interact.json](https://raw.githubusercontent.com/alexal1/Insomniac/master/config-examples/interact.json) and put it near `start.py`. Then run:
```
Expand Down Expand Up @@ -129,25 +129,29 @@ Pull requests are welcome! Any feature you implement will be included in the Ins
### Filtering
You may want to ignore mass-followers (e.g. > 1000 followings) because they are most likely interested only in growing their audience. Or ignore too popular accounts (e.g. > 5000 followers) because they won't notice you. You can do this (and more) by using `filter.json` file. List of available parameters:

| Parameter | Value | Description |
| ------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------|
| `skip_business` | `true/false` | skip business accounts if true |
| `skip_non_business` | `true/false` | skip non-business accounts if true |
| `min_followers` | 100 | skip accounts with less followers than given value |
| `max_followers` | 5000 | skip accounts with more followers than given value |
| `min_followings` | 10 | skip accounts with less followings than given value |
| `max_followings` | 1000 | skip accounts with more followings than given value |
| `min_potency_ratio` | 1 | skip accounts with ratio (followers/followings) less than given value (decimal values can be used too) |
| `max_potency_ratio` | 1 | skip accounts with ratio (followers/followings) higher than given value (decimal values can be used too) |
| `privacy_relation` ` | `"only_public"` / `"only_private"` / `"private_and_public"` | choose with accounts of which type you want to interact, `"only_public"` by default |
| `min_posts` | 7 | minimum posts in profile in order to interact |
| `max_digits_in_profile_name` | 4 | maximum amount of digits in profile name (more than that - won't be interacted) |
| `skip_profiles_without_stories` | `true/false` | skip accounts that doesnt have updated story (from last 24 hours) |
| `blacklist_words` | `["word1", "word2", "word3", ...]` | skip accounts that contains one of the words in the list in the profile biography |
| `mandatory_words` | `["word1", "word2", "word3", ...]` | skip accounts that doesn't have one of the words in the list in the profile biography |
| `specific_alphabet` | `["LATIN", "ARABIC", "GREEK", "HEBREW", ...]` | skip accounts that contains text in their biography/username which different than the provided alphabet list |

Please read detailed explanation and instructions how to use it [in this post](https://www.patreon.com/posts/43362005).
| Parameter | Value | Description |
| --------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------|
| `skip_business` | `true/false` | skip business accounts if true |
| `skip_non_business` | `true/false` | skip non-business accounts if true |
| `min_followers` | 100 | skip accounts with less followers than given value |
| `max_followers` | 5000 | skip accounts with more followers than given value |
| `min_followings` | 10 | skip accounts with less followings than given value |
| `max_followings` | 1000 | skip accounts with more followings than given value |
| `min_potency_ratio` | 1 | skip accounts with ratio (followers/followings) less than given value (decimal values can be used too) |
| `max_potency_ratio` | 1 | skip accounts with ratio (followers/followings) higher than given value (decimal values can be used too) |
| `privacy_relation` ` | `"only_public"` / `"only_private"` / `"private_and_public"` | choose with accounts of which type you want to interact, `"only_public"` by default |
| `min_posts` | 7 | minimum posts in profile in order to interact |
| `max_digits_in_profile_name` | 4 | maximum amount of digits in profile name (more than that - won't be interacted) |
| `skip_profiles_without_stories` | `true/false` | skip accounts that doesnt have updated story (from last 24 hours) |
| `blacklist_words` | `["word1", "word2", "word3", ...]` | skip accounts that contains one of the words in the list in the profile biography |
| `mandatory_words` | `["word1", "word2", "word3", ...]` | skip accounts that doesn't have one of the words in the list in the profile biography |
| `specific_alphabet` | `["LATIN", "ARABIC", "GREEK", "HEBREW", ...]` | skip accounts that contains text in their biography/username which different than the provided alphabet list |
| `skip_already_following_profiles` | `true/false` | skip accounts that your profile already followed, even if not followed by the bot |


Please read detailed explanation and instructions how to use filter in [this Patreon post](https://www.patreon.com/posts/43362005).

_IMPORTANT: Please use_ `--total-get-profile-limit 500` _(or some other value) when using filter. You may get a soft ban because of opening and closing too large amount of Instagram profiles._

### Whitelist and Blacklist
**Whitelist** – affects `--remove-mass-followers`, `--unfollow` and all other unfollow actions. Users from this list will _never_ be removed from your followers or unfollowed.
Expand All @@ -156,6 +160,11 @@ Please read detailed explanation and instructions how to use it [in this post](h

Go to Insomniac folder and create a folder named as your Instagram nickname (or open an existing one, as Insomniac creates such folder when launched). Create there a file `whitelist.txt` or `blacklist.txt` (or both of them). Write usernames in these files, one username per line, no `@`'s, no commas. Don't forget to save. That's it!

### Targets Interaction
Go to Insomniac folder and create a folder named as your Instagram nickname (or open an existing one, as Insomniac creates such folder when launched). Create there a file `targets.txt`. Write usernames in these files, one username per line, no `@`'s, no commas. Don't forget to save.

Run Insomniac with --interact-targets parameter, and the session will be targeted on those specific profiles form the `targets.txt` file.

### Analytics
There also is an analytics tool for this bot. It is a script that builds a report in PDF format. The report contains account's followers growth graphs for different periods. Liking, following and unfollowing actions' amounts are on the same axis to determine bot effectiveness. The report also contains stats of sessions length for different configurations that you've used. All data is taken from `sessions.json` file that's generated during bot's execution.
<img src="https://raw.githubusercontent.com/alexal1/Insomniac/master/res/analytics_sample.png">
Expand Down
50 changes: 43 additions & 7 deletions config-examples-extra/interact.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"value": "True",
"description" : "add this flag to use an old version of uiautomator. Use it only if you experience problems with the default version"
},
{
"parameter-name": "no_speed_check",
"enabled": false,
"value": "True",
"description" : "skip internet speed check at start"
},
{
"parameter-name": "repeat",
"enabled": true,
Expand All @@ -29,6 +35,12 @@
"value": "1-2",
"description" : "number of likes for each interacted user, 2 by default. It can be a number (e.g. 2) or a range (e.g. 2-4)"
},
{
"parameter-name": "likes_percentage",
"enabled": true,
"value": "80",
"description" : "likes given percentage of interacted users, 100 by default"
},
{
"parameter-name": "stories_count",
"enabled": true,
Expand All @@ -45,11 +57,19 @@
"parameter-name": "interact",
"enabled": true,
"value": [
"@natgeo",
"amazingtrips"
"@natgeo-followers",
"@natgeo-following",
"amazingtrips-top-likers",
"amazingtrips-recent-likers"
],
"description" : "list of hashtags and usernames. Usernames should start with \\\"@\\\" symbol. The script will interact with hashtags\\' posts likers and with users\\' followers"
},
{
"parameter-name": "reinteract_after",
"enabled": false,
"value": "72-96",
"description" : "set a time (in hours) to wait before re-interact with an already interacted profile, disabled by default (won't interact again). It can be a number (e.g. 48) or a range (e.g. 50-80)"
},
{
"parameter-name": "interaction_users_amount",
"enabled": true,
Expand All @@ -68,6 +88,12 @@
"value": "150",
"description" : "minimum amount of followings, after reaching this amount unfollow stops"
},
{
"parameter-name": "max_following",
"enabled": false,
"value": "150",
"description" : "maximum amount of followings, after reaching this amount follow stops. disabled by default"
},
{
"parameter-name": "unfollow_non_followers",
"enabled": false,
Expand Down Expand Up @@ -96,8 +122,10 @@
"parameter-name": "scrape",
"enabled": false,
"value": [
"@natgeo",
"morning"
"@natgeo-followers",
"@natgeo-following",
"amazingtrips-top-likers",
"amazingtrips-recent-likers"
],
"description" : "list of hashtags and usernames. Usernames should start with \\\"@\\\" symbol. The script will scrape with hashtags\\' posts likers and with users\\' followers"
},
Expand All @@ -108,7 +136,7 @@
"description" : "Remove given number of mass followers from the list of your followers. \"Mass followers\" are those who has more than N followings, where N can be set via --max-following"
},
{
"parameter-name": "max_following",
"parameter-name": "mass_follower_min_following",
"enabled": false,
"value": "1-2",
"description" : "Should be used together with --remove-mass-followers. Specifies max number of followings for any your follower, 1000 by default"
Expand Down Expand Up @@ -167,9 +195,15 @@
"value": "50-60",
"description" : "limit on total amount of stories watches during the session, disabled by default. It can be a number (e.g. 27) or a range (e.g. 20-30)"
},
{
"parameter-name": "session_length_in_mins_limit",
"enabled": false,
"value": "50-60",
"description" : "limit the session length by time (minutes), disabled by default. It can be a number (e.g. 60) or a range (e.g. 40-70)"
},
{
"parameter-name": "filters",
"enabled": true,
"enabled": false,
"value": {
"skip_business": false,
"skip_non_business": false,
Expand All @@ -178,13 +212,15 @@
"min_followings": 10,
"max_followings": 10000,
"min_potency_ratio": 0.45,
"max_potency_ratio": 100,
"min_posts": 7,
"max_digits_in_profile_name": 4,
"privacy_relation": "private_and_public",
"skip_profiles_without_stories": false,
"blacklist_words": ["word1", "word2"],
"mandatory_words": ["word1", "word2"],
"specific_alphabet": ["LATIN", "ARABIC", "HEBREW"]
"specific_alphabet": ["LATIN", "ARABIC", "HEBREW"],
"skip_already_following_profiles": true
},
"description" : "add this argument if you want to pass filters as an argument and not from filters.json file"
}
Expand Down
Loading

0 comments on commit 51ae217

Please sign in to comment.