Main Features

class app.instapy.InstaPyLight(username=None, password=None, nogui=False, selenium_local_session=True, bypass_suspicious_attempt=False, page_delay=25, show_logs=True, headless=False, proxy_address=None, proxy_port=0)

Main Class

cancel_pending_follow_requests(accounts, amount)

Note

This feature is under development

end()

Closes the current session

follow_by_list(followlist, times=1)

Allows to follow by any scrapped list

follow_user_followers(profiles, amount=10, randomize=False, interact=False, sleep_delay=600)

Follow competitors followers

Args:
profiles:profiles to follow followers
amount:amount of follows per profile
randomize:follow profile randomly
interact:?
sleep_delay:<- we need to automate it inside the feature
Example:
profiles = ['profile1', 'profile2', 'profile3']
follow_user_followers(profiles,
                      amount=10,
                      randomize=True)
follow_user_following(usernames, amount=10, randomize=False, interact=False, sleep_delay=600)

Follow competitor followings

interact_by_users(usernames, amount=10, randomize=False, media=None)

Likes some amounts of images for each usernames

interact_user_followers(usernames, amount=10, randomize=False)

?

interact_user_following(usernames, amount=10, randomize=False)

?

like_by_feed(amount=50, randomize=False, unfollow=False, interact=False)

Like the users feed

like_by_locations(locations=None, amount=50, media=None, skip_top_posts=True)

Likes (default) 50 images per given locations

like_by_tags(tags=None, amount=50, media=None, skip_top_posts=True, use_smart_hashtags=False)

Likes (default) 50 images per given tag

Args:
tags:list of tags to be liked
amount:amount of interactions
media:Photo or Video are available
skip_top_posts:skip initial posts
use_smart_hashtags:
 auto generate hashtags to be liked
like_by_users(usernames, amount=10, randomize=False, media=None)

Likes some amounts of images for each usernames

like_from_image(url, amount=50, media=None)

Gets the tags from an image and likes 50 images for each tag

login()

Used to login the user either with the username and password

save_screenshot(filename)

Save screen shot and save it

Args:
filename:filename of the screen shot
set_blacklist(campaign, blacklist_likes, blacklist_follows, never_follow_again)

Enable blacklist feature

Args:
campaign:every blacklist campaign has a name
blacklist_likes:
 blacklist profile after liking a post
blacklist_follows:
 blacklist profile after following
never_follow_again:
 mark profile to never be followed again
Example:
set_blacklist('campaign_name',
              blacklist_likes=False,
              blacklist_follows=True,
              never_follow_again=True)
set_do_follow(percentage=0, times=1)

Defines if the user of the liked image should be followed

set_dont_like(tags=None)

Changes the possible restriction tags, if one of this words is in the description, the image won’t be liked

set_dont_touch(profiles=None)

Defines which accounts should not be liked, followed and unfollowed

Args:
profiles:list of profiles to respect this rule
set_dont_unfollow_active_users(posts=4)

Prevents unfollow followers who have liked one of your latest X posts

Args:
posts:amount of posts to collect profile to not unfollow

Warning

feature not working

set_ignore_if_contains(words=None)

Ignores the don’t likes if the description contains one of the given words

set_lower_follower_count(limit=None)

Used to chose if a post is liked by the number of likes

set_selenium_local_session()

Starts local session for a selenium server

set_selenium_remote_session(selenium_url='')

Starts remote session for a selenium server. Useful for docker setup.

set_sleep_reduce(percentage)

Can we delete it ?

set_smart_hashtags(tags=None, limit=3, sort='top', log_tags=True)

Generate smart hashtags based on https://displaypurposes.com/ ranking, banned and spammy tags are filtered out

set_upper_follower_count(limit=None)

Used to chose if a post is liked by the number of likes

set_use_clarifai(api_key=None, full_match=False)

Defines if the clarifai img api should be used which ‘project’ will be used (only 5000 calls per month)

set_user_interact(amount=10, percentage=100, randomize=False, media=None)

Define if posts of given user should be interacted

unfollow_by_blacklist_campaign(campaign, amount)

Unfollow only profiles in certain blacklist campaign

Args:
campaign:blacklist campaign name
amount:amount of profiles to unfollow
unfollow_users(amount=10)

Unfollow users

Args:
amount:amount of profiles to unfollow

Warning

onlyNotFollowMe feature not working

Example:
unfollow_users(amount=10)
whats_my_ip()

Check and retrieve actual IP address