Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. """
  2. This template is written by @Nocturnal-2
  3. What does this quickstart script aim to do?
  4. - I do some unfollow and like by tags mostly
  5. NOTES:
  6. - I am an one month old InstaPy user, with a small following. So my numbers
  7. in settings are bit conservative.
  8. """
  9.  
  10. from instapy import InstaPy
  11. from instapy import smart_run
  12.  
  13. # get a session!
  14. session = InstaPy(username='', password='', headless_browser=False)
  15.  
  16. # let's go! :>
  17. with smart_run(session):
  18. """ Start of parameter setting """
  19. # don't like if a post already has more than 150 likes
  20. session.set_delimit_liking(enabled=True, max=150, min=0)
  21.  
  22. # don't comment if a post already has more than 4 comments
  23. session.set_delimit_commenting(enabled=True, max=3, min=0)
  24.  
  25. """I used to have potency_ratio=-0.85 and max_followers=1200 for
  26. set_relationship_bounds()
  27. Having a stricter relationship bound to target only low profiles
  28. users was not very useful,
  29. as interactions/sever calls ratio was very low. I would reach the
  30. server call threshold for
  31. the day before even crossing half of the presumed safe limits for
  32. likes, follow and comments (yes,
  33. looks like quiet a lot of big(bot) managed accounts out there!!).
  34. So I relaxed it a bit to -0.50 and 2000 respectively.
  35. """
  36. session.set_relationship_bounds(enabled=True,
  37. potency_ratio=-0.50,
  38. delimit_by_numbers=True,
  39. max_followers=4000,
  40. max_following=2500,
  41. min_followers=35,
  42. min_following=25)
  43. session.set_do_comment(True, percentage=20)
  44. session.set_do_follow(enabled=True, percentage=20, times=2)
  45. session.set_comments(['Amazing!', 'Awesome!!', 'Cool!', 'Good one!',
  46. 'Really good one', 'Love this!', 'Like it!:thumbsup:',
  47. 'Beautiful!', 'Great!', 'Nice one', ':thumbsup:', 'Just incredible :open_mouth:'])
  48. session.set_sleep_reduce(200)
  49.  
  50. """ Get the list of non-followers
  51. I duplicated unfollow_users() to see a list of non-followers which I
  52. run once in a while when I time
  53. to review the list
  54. """
  55. # session.just_get_nonfollowers()
  56.  
  57. # my account is small at the moment, so I keep smaller upper threshold
  58. session.set_quota_supervisor(enabled=True,
  59. sleep_after=["likes", "comments_d", "follows",
  60. "unfollows", "server_calls_h", "grab_followers"],
  61. sleepyhead=True, stochastic_flow=True,
  62. notify_me=True,
  63. peak_likes=(8, 80),
  64. peak_comments=(5, 50),
  65. peak_follows=(5, 20),
  66. peak_server_calls=(None, 3000))
  67.  
  68. """End of parameter setting """
  69. """ Actions start here """
  70. # Unfollow users
  71. """ Users who were followed by InstaPy, but not have followed back will
  72. be removed in
  73. One week (168 * 60 * 60)
  74. Yes, I give a liberal one week time to follow [back] :)
  75. """
  76. """ session.unfollow_users(amount=25, InstapyFollowed=(True, "nonfollowers"),
  77. style="RANDOM",
  78. unfollow_after=168 * 60 * 60,
  79. sleep_delay=600) """
  80.  
  81. # Follower the targets followers
  82. targetSimilar = ['healthy_lydz', 'yourcoachjesse']
  83. session.follow_user_followers(targetSimilar, amount=5, randomize=True)
  84. session.set_user_interact(amount=5, randomize=True, percentage=50, media='Photo')
  85.  
  86.  
  87.  
  88.  
  89. # Remove specific users immediately
  90. """ I use InstaPy only for my personal account, I sometimes use custom
  91. list to remove users who fill up my feed
  92. with annoying photos
  93. """
  94. # custom_list = ["sexy.girls.pagee", "browneyedbitch97"]
  95. #
  96. # session.unfollow_users(amount=20, customList=(True, custom_list,
  97. # "all"), style="RANDOM",
  98. # unfollow_after=1 * 60 * 60, sleep_delay=200)
  99.  
  100. # Like by tags
  101. """ I mostly use like by tags. I used to use a small list of targeted
  102. tags with a big 'amount' like 300
  103. But that resulted in lots of "insufficient links" messages. So I
  104. started using a huge list of tags with
  105. 'amount' set to something small like 50. Probably this is not the
  106. best way to deal with "insufficient links"
  107. message. But I feel it is a quick work around.
  108. """
  109.  
  110. session.like_by_tags(['tag1', 'tag2', 'tag3', 'tag4'], amount=200)
  111.  
  112. """ Joining Engagement Pods...
  113. """
  114. session.join_pods()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement