Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. """
  2. This template is written by @Nuzzo235
  3.  
  4. What does this quickstart script aim to do?
  5. - This script is targeting followers of similar accounts and influencers.
  6. - This is my starting point for a conservative approach: Interact with the
  7. audience of influencers in your niche with the help of 'Target-Lists' and
  8. 'randomization'.
  9.  
  10. NOTES:
  11. - For the ease of use most of the relevant data is retrieved in the upper part.
  12. """
  13.  
  14. import random
  15. from instapy import InstaPy
  16. from instapy import smart_run
  17.  
  18. # login credentials
  19. insta_username = ''
  20. insta_password = ''
  21.  
  22. # restriction data
  23. dont_likes = ['#exactmatch', '[startswith', ']endswith', 'broadmatch']
  24. ignore_users = ['user1', 'user2', 'user3']
  25.  
  26. """ Prevent commenting on and unfollowing your good friends (the images will
  27. still be liked)...
  28. """
  29. friends = ['friend1', 'friend2', 'friend3']
  30.  
  31. """ Prevent posts that contain...
  32. """
  33. ignore_list = []
  34.  
  35. # TARGET data
  36. """ Set similar accounts and influencers from your niche to target...
  37. """
  38. targets = ['rob.gryn', 'user2', 'user3']
  39.  
  40. """ Skip all business accounts, except from list given...
  41. """
  42. target_business_categories = ['category1', 'category2', 'category3']
  43.  
  44. # COMMENT data
  45. comments = ['Nice shot! @{}',
  46. 'I love your profile! @{}',
  47. 'Your feed is an inspiration :thumbsup:',
  48. 'Just incredible :open_mouth:',
  49. 'What camera did you use @{}?',
  50. 'Love your posts @{}',
  51. 'Looks awesome @{}',
  52. 'Getting inspired by you @{}',
  53. ':raised_hands: Yes!',
  54. 'I can feel your passion @{} :muscle:']
  55.  
  56. # get a session!
  57. session = InstaPy(username=insta_username,
  58. password=insta_password,
  59. headless_browser=True,
  60. disable_image_load=True,
  61. multi_logs=True)
  62.  
  63. # let's go! :>
  64. with smart_run(session):
  65. # HEY HO LETS GO
  66. # general settings
  67. session.set_dont_include(friends)
  68. session.set_dont_like(dont_likes)
  69. session.set_ignore_if_contains(ignore_list)
  70. session.set_ignore_users(ignore_users)
  71. session.set_simulation(enabled=True)
  72. session.set_relationship_bounds(enabled=True,
  73. potency_ratio=None,
  74. delimit_by_numbers=True,
  75. max_followers=7500,
  76. max_following=3000,
  77. min_followers=25,
  78. min_following=25,
  79. min_posts=1)
  80.  
  81. session.set_skip_users(skip_private=True,
  82. skip_no_profile_pic=False,
  83. skip_business=True,
  84. dont_skip_business_categories=[
  85. target_business_categories])
  86.  
  87. session.set_user_interact(amount=1, randomize=True, percentage=80,
  88. media='Photo')
  89. session.set_do_like(enabled=True, percentage=90)
  90. session.set_do_comment(enabled=False, percentage=15)
  91. session.set_comments(comments, media='Photo')
  92. session.set_do_follow(enabled=True, percentage=90, times=1)
  93.  
  94. # activities
  95.  
  96. # FOLLOW+INTERACTION on TARGETED accounts
  97. """ Select users form a list of a predefined targets...
  98. """
  99. number = random.randint(3, 5)
  100. random_targets = targets
  101.  
  102. if len(targets) <= number:
  103. random_targets = targets
  104.  
  105. else:
  106. random_targets = random.sample(targets, number)
  107.  
  108. """ Interact with the chosen targets...
  109. """
  110. session.follow_user_followers(random_targets,
  111. amount=random.randint(30, 60),
  112. randomize=True, sleep_delay=600,
  113. interact=True)
  114.  
  115. # UNFOLLOW activity
  116. """ Unfollow nonfollowers after one day...
  117. """
  118. session.unfollow_users(amount=random.randint(75, 100),
  119. InstapyFollowed=(True, "nonfollowers"),
  120. style="FIFO",
  121. unfollow_after=24 * 60 * 60, sleep_delay=600)
  122.  
  123. """ Unfollow all users followed by InstaPy after one week to keep the
  124. following-level clean...
  125. """
  126. session.unfollow_users(amount=random.randint(75, 100),
  127. InstapyFollowed=(True, "all"), style="FIFO",
  128. unfollow_after=168 * 60 * 60, sleep_delay=600)
  129.  
  130. """ Joining Engagement Pods...
  131. """
  132. session.join_pods()
  133.  
  134. """
  135. Have fun while optimizing for your purposes, Nuzzo
  136. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement