SHARE
TWEET

Untitled

a guest Jan 26th, 2019 156 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. """ Quickstart script for InstaPy usage """
  2. # imports
  3. import requests, json
  4. from instapy import InstaPy
  5. from instapy.util import smart_run
  6.  
  7. # login credentials
  8. insta_username = ''
  9. insta_password = ''
  10.  
  11. # get an InstaPy session!
  12. # set headless_browser=True to run InstaPy in the background
  13. session = InstaPy(username=insta_username,
  14.                   password=insta_password,
  15.                   headless_browser=True,
  16.                   disable_image_load=True,
  17.                   multi_logs=True)
  18.  
  19. with smart_run(session):
  20.     """ Activity flow """
  21.  
  22.     # Quota supervisor
  23.     session.set_quota_supervisor(enabled=True,
  24.                                  sleep_after=["likes_h", "follows_h", "unfollows_h"],
  25.                                  sleepyhead=True, stochastic_flow=True, notify_me=True,
  26.                                  peak_likes=(70, 300),
  27.                                  peak_follows=(10, 150),
  28.                                  peak_unfollows=(35, 150))
  29.  
  30.     # Settings
  31.     session.set_relationship_bounds(enabled=True,
  32.                                     delimit_by_numbers=True,
  33.                                     max_followers=3000,
  34.                                     min_followers=300,
  35.                                     min_posts=9)
  36.     session.set_do_comment(enabled=False)
  37.     session.set_do_like(enabled=True, percentage=100)
  38.     session.set_do_follow(enabled=True, percentage=100)
  39.     # session.set_do_follow(enabled=True, percentage=50, times=1)
  40.  
  41.     # Actions
  42.     session.set_user_interact(amount=2, randomize=True, percentage=100, media='Photo')
  43.     # session.like_by_feed(amount=15, randomize=True, unfollow=False, interact=False)
  44.     session.like_by_tags(
  45.         ['#viaggiaresempre', '#amoviaggiare', '#sempreinviaggio', '#viaggiarechepassione', '#weareitaliantravellers',
  46.          '#siviaggiare'],
  47.         amount=50,
  48.         interact=True)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top