How to use the instapy.InstaPy function in instapy

To help you get started, we’ve selected a few instapy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Instagram-Tools / bot / scheduleInstaPy.py View on Github external
def job():
    try:
        # check time restrictions
        is_not_hour_to_run = InstaPyStorage()
        if is_not_hour_to_run.check_limit() is True:
            print("Not an Hour to run")
            return 0
        #taglist = ['10monthsold', '8monthsold', 'babygram', 'kidstagram', 'babybump', '6months', 'proudmommy', 'toddlerfashion','girlmom','bows','momofgirls', 'babygirl', 'mommylife', 'momanddaughter', 'baby', 'mybabygirl', 'babygirl']
        taglist = ['10monthsold', '8monthsold', 'babygram', 'kidstagram', 'babybump', '6months', 'childhoodunplugged', 'candidchildhood', 'cameramama']
        shuffle(taglist)
        taglist = taglist[:5]
        print(taglist)

        #create instance
        session = InstaPy(username=insta_username, password=insta_password,
                          proxy_address='67.220.231.78', proxy_port=21317)
        session.login()

        # limits
        session.set_dont_like(['boy', 'boys', 'store', 'shop in bio', 'shipping', 'worldwide', 'shop'])
        #limits
        session.set_blacklist(enabled=True, campaign='General')
        session.set_upper_follower_count(limit=25500)
        session.set_dont_include(original_all_following)
        session.set_dont_include_language(['fa', 'ar', 'id', 'tr', 'ab', 'af', 'as', 'az', 'ba', 'zh', 'cv', 'th', 'sq'])
        session.set_user_interact(amount=2, randomize=False, percentage=100, media='Photo', listUsersFromDirectory=True)
        #configurations
        session.set_do_like(True, percentage=95)
        session.set_do_comment(True, percentage=20)
        session.set_do_follow(True, percentage=30, times=1)
github Instagram-Tools / bot / quickstart.py View on Github external
""" Quickstart script for InstaPy usage """
# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace

# login credentials
insta_username = ''
insta_password = ''

# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=False)

with smart_run(session):
    """ Activity flow """
    # general settings
    session.set_relationship_bounds(enabled=True,
                                    delimit_by_numbers=True,
                                    max_followers=4590,
                                    min_followers=45,
                                    min_following=77)

    session.set_dont_include(["friend1", "friend2", "friend3"])
    session.set_dont_like(["pizza", "#store"])

    # activity
github Tkd-Alex / Telegram-InstaPy-Scheduling / scripts.py View on Github external
def biglikers(username, password, proxy):
    try:
        session = instapy.InstaPy(username=username, password=password)
        session.login()
        session.end()
    except:
        print(traceback.format_exc())
github Instagram-Tools / bot / quickstart_templates / Super simple settings for crontab.py View on Github external
"""
This template is written by @Edhim

What does this quickstart script aim to do?
- I am using simple settings for my personal account with a crontab each 3H, it's been working since 5 months with no problem.
"""


from instapy import InstaPy
from instapy.util import smart_run



# get a session!
session = InstaPy(username='', password='')


# let's go! :>
with smart_run(session):
    # settings
    session.set_relationship_bounds(enabled=False,
                                     potency_ratio=-1.21,
                                     delimit_by_numbers=True,
                                      max_followers=4590,
                                      max_following=5555,
                                      min_followers=45,
                                      min_following=77)
    session.set_do_comment(True, percentage=50)
    session.set_comments(['aMazing!', 'So cool!!', 'Nice!', 'wow looks nice!', 'this is awesome!'])

    # activity
github InstaPy / instapy-quickstart / quickstart_templates / follow_unfollow_and_send_telegram_msg.py View on Github external
def get_session():
    session = InstaPy(username=insta_username,
                      password=insta_password,
                      headless_browser=True,
                      nogui=True,
                      multi_logs=False)

    return session
github Tkd-Alex / Telegram-InstaPy-Scheduling / process.py View on Github external
def run(self):
        sys.path.append(self.instapy_path)  
        from instapy import InstaPy      

        self.start = datetime.datetime.now().replace(microsecond=0)
        self.bot.send_message(self.chat_id, text='InstaPy Bot - {} start at {}'.format(self.job_name, time.strftime("%X")))
        
        scripts[self.script_name](InstaPy, self.username, self.password, self.proxy)

        self.end(forced=False)