insta-likecom-bot is an instagram bot written in python to automatically like and comment on an account or tag.
Table of Contents
View the requirements.txt
pip install -r requirements.txt
Required arguments | Argument | Description |
---|---|---|
username | Instagram username | |
password | Instagram password | |
target | An instagram account or tag | |
limits | json file defining daily/hourly limits |
Optional Arguments | Option | Description |
---|---|---|
-np , --numofposts | number of posts to like | |
-ps , --postscript | additional text to add after every comment | |
-c , --comments | file containing comments (one comment per line) | |
-oc , --onecomment | specify only one comment | |
-nc , --nocomments | turn off comments | |
-sc, --skipcommented | skip posts already commented | |
-lc, --likecomments | like top n user comments per post | |
-ff, --findfollowers | like/comment on posts from target's followers | |
-fa, --followersamount | number of followers to process (default=all) | |
-il, --inlast | target post within last n days (default=all) ex. 1y, 2M, 3d, 4h, 53m, 10s | |
-vs, --viewstory | view stories | |
-ls, --likestory | like stories (default=all) | |
-cs, --commentstory | comments on stories (no comments if option not used) | |
-os, --onlystory | target only stories and not posts | |
-nr, --numofreels | number of reels to like | |
-nrc, --noreelcomments | turn off reel comments | |
-lrc, --likereelcomments | like top n user comments per reel | |
-or, --onlyreels | target only reels and not posts | |
-mr, --mostrecent | target most recent posts | |
-rr, --reloadrepeat | reload the target n times (used with -mr) | |
-mt, --matchtags | read tags to match from a file | |
-mn, --matchtagnum | minimum tag match count for post to be qualified | |
-ma, --matchalltags | match all tags in matchtags | |
-lm, --limits | json file with limits configuration | |
-et , --eltimeout | max time to wait for elements to be loaded (default=30) | |
-d , --delay | time to wait while moving from one post to another | |
-br, --browser | browser to use [chrome or firefox] (default=chrome) | |
-pr, --profile | loads profile from a json file | |
-bp, --brprofile | loads chrome profile from a path |
To like and comment every post
ilcbot.py -u yourusername -p yourpassword -t thetarget --limits limits.json
To like and comment on stories
ilcbot.py -u yourusername -p yourpassword -t thetarget -ls -cs 20 -lm limits.json
To like and comment on reels
ilcbot.py -u yourusername -p yourpassword -t thetarget -nr 10 -lm limits.json
To specify number of posts to like
ilcbot.py -u yourusername -p yourpassword -t thetarget -np NOOFPOSTS -lm limits.json
To like and comment on posts from target's followers
ilcbot.py -u yourusername -p yourpassword -t thetarget -np NOOFPOSTS -ff -lm limits.json
To specify a delay
ilcbot.py -u yourusername -p yourpassword -t thetarget -d DELAY -lm limits.json
ilcbot.py -u yourusername -p yourpassword -t thetarget -d start,end -lm limits.json
To specify a file with comments
ilcbot.py -u yourusername -p yourpassword -t thetarget -c FILE -lm limits.json
To specify only one comment
ilcbot.py -u yourusername -p yourpassword -t thetarget -oc TEXT -lm limits.json
To add a text to the end of every comment
ilcbot.py -u yourusername -p yourpassword -t thetarget -ps TEXT -lm limits.json
To leave no comments
ilcbot.py -u yourusername -p yourpassword -t thetarget -nc -lm limits.json
To like comments from other users
ilcbot.py -u yourusername -p yourpassword -t thetarget -ls 5 -lm limits.json
To filter posts within last 2 days
ilcbot.py -u yourusername -p yourpassword -t thetarget -il 2d -lm limits.json
To filter posts within last 5 months
ilcbot.py -u yourusername -p yourpassword -t thetarget -il 5M -lm limits.json
To filter posts within last 3 years
ilcbot.py -u yourusername -p yourpassword -t thetarget -il 3y -lm limits.json
To target most recent posts
ilcbot.py -u yourusername -p yourpassword -t thetarget -mr -lm limits.json
To reload target 5 times with most recent posts
ilcbot.py -u yourusername -p yourpassword -t thetarget -mr -rr 5 -lm limits.json
To filter posts based on tags
ilcbot.py -u yourusername -p yourpassword -t thetarget --matchtags tags.txt -lm limits.json
To specify a browser
ilcbot.py -u yourusername -p yourpassword -t thetarget -br firefox -lm limits.json
To specify a profile
ilcbot.py -pr profile1.json -lm limits.json
To specify a browser profile
ilcbot.py -u yourusername -p yourpassword -t thetarget -bp '/path/to/Profile 1' -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -np 5 -ff -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -np 20 -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t "#haiku" -ps "Follow me @bob101" -c mycomments.txt -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t "#haiku" -oc "Hello there" -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk --delay 5 --numofposts 30 -lm limits.json
ilcbot.py -u 'bob101' -p 'b@bpassw0rd1' -t "#haiku" --delay 2,20 -lm limits.json
ilcbot.py --loadenv --delay 5 --numofposts 10 --headless --nocomments -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -d 5 -np 30 -lc 5 -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -np 30 -il 3h -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -np 30 --matchtags tags.txt --ignoretags ignoretags.txt -lm limits.json
ilcbot.py -pr profile1.json -lm limits.json
ilcbot.py -u bob101 -p b@bpassw0rd1 -t elonmusk -np 30 --brprofile '/path/to/Profile 1' -lm limits.json
Note: Enclose tagnames (#haiku) in double-quotes/single-quotes when running the script in PowerShell/Bash.
ilcbot.py -u bob101 -p b@bpassw0rd1 -t "#haiku" -ps "Follow me @bob101" -c mycomments.txt
ilcbot.py -u 'bob101' -p 'b@bpassw0rd1' -t "#haiku" -ps "Follow me @bob101" -c mycomments.txt
Sample profiles
{
"username": "bob01",
"password":"passw0rd",
"target": "targets.txt",
"numofposts": "3",
"matchtags": "tags.txt",
"ignoretags": "ignore.txt",
"comments": "comments.txt",
"viewstory": true,
"likestory": 1,
"inlast": "3d",
"delay": "5",
"likecomments": 2,
"nocomments": true
}
{
"username": "bob01",
"password":"passw0rd",
"target": ["#haikus", "#photography"],
"numofposts": "3",
"matchtags": ["#haiku", "#haikus", "#haikupoetry"],
"ignoretags": ["#shorts"],
"comments": "comments.txt",
"viewstory": true,
"likestory": 1,
"inlast": "3d",
"delay": "5",
"likecomments": 2,
"nocomments": true,
"brprofile" : "/dir/dir1/Profile 1"
}
{
"username": "bob01",
"password":"passw0rd",
"target": "#photography",
"numofposts": 2,
"comments": ["Beautiful!", "Amazing!", "I can relate to this"],
"delay": "5,20"
}
Sample target files
targets.txt
#haiku
#photography
bob01
elonmusk
Sample file with tags
tagstomatch.txt
#gym
#fitness
#stayfit
#healthylife
#workout
Sample file with comments
comments.txt
๐ฅ๐ฅ๐ฅ
๐๐
Beyond amazing ๐
Youโre the goat
This is fire ๐ฅ
Keep grinding ๐ช
Insane bro ๐ฅ
The shocker! ๐ฎ
Such a beauty ๐โค๏ธ
Sample limits configuration file
instalimits.json
{
"daily": {
"likes": 1000,
"stories": 1000,
"story_likes": 600,
"comment_likes": 1500,
"accounts": 800,
"comments": 1000
},
"hourly": {
"likes": 350,
"accounts": 120,
"comments": 200
}
}
Version v.3.0.7 (latest)
Bug Fixes:
Version v.3.0.6
Bug Fixes:
Version v.3.0.5
Changes:
Bug Fixes:
Version v.3.0.4
Feature addition:
Changes:
Bug Fixes:
Version v.3.0.3
Bug Fixes:
Changes:
Version v.3.0.2
Feature addition:
Changes:
Version v.2.8
Feature addition:
Bug Fixes:
Version v.2.7
Feature addition:
Report a bug or an issue