An Insagram bot made with Python and independant from the Instagram API.
Method | Definition | Argument(s) |
---|---|---|
login | login to instagram | - |
follow | follow an user | user_id |
unfollow | unfollow an user | user_id |
like | like a media | media_id |
unlike | unlike a media | media_id |
comment | post a comment (return the comment_id) | media_id, text |
uncomment | delete a comment | media_id, comment_id |
explore | return a list of medias | tag |
downloadMedia | download a media | media_shortcode |
getUserDetails | return a dictionary with the user details | username |
usernameToUserId | return the user_id | username |
userIdToUsername | return the username | user_id |
Parameter | Definition | Default value |
---|---|---|
tags | list of tags to explore | ("default") |
follow_ratio | probability to follow a media owner | 1 |
like_ratio | probability to like a media | 1 |
comment_ratio | probability to coment a media | 0.33 |
average_time_gap | average time between each media iteration | 30 |
max_stack_size | number of medias to explore at each loop | 5 |
comments | list of sub_comment | (("Super", "Beautiful", "Great"), ("post", "picture"), ("!", "")) |
add_to_unfollow_queue | the followed users will be unfollowed | True |
follow_duration | time before unfollowing | 600 |
media_owner_max_followers | max followers for follow | 500 |
media_max_likes | max likes for like | 20 |
medias_posted_before_time | handle only the medias posted before time | 300 |
allow_videos | are videos handled | False |
users_blacklist | these users won't be followed | ("user0") |
users_whitelist | these users won't be unfollowed | ("user1") |
start_at | starting time | dtime(hour= 7) |
end_at | ending_time | dtime(hour= 22, minute= 30) |
git clone
this repo or download as a ZIP and extractpip install -r requirements.txt
These are the approximately Instagram limits. Be worry of respecting them or you'll get a bunch of 403 HTTP errors and might get banned !