Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. """
  2. What does this quickstart script aim to do?
  3. - This script is automatically executed every 6h on my server via cron
  4. """
  5.  
  6. import random
  7. from instapy import InstaPy
  8. from instapy import smart_run
  9.  
  10. # login credentials
  11. insta_username = ''
  12. insta_password = ''
  13.  
  14. dont_likes = ['Tags not to like', 'tag', 'tag']
  15.  
  16. friends = ['list of friends I do not want to interact with']
  17.  
  18. like_tag_list = ['Tags to like', 'tag', 'tag']
  19.  
  20. # prevent posts that contain some plantbased meat from being skipped
  21. ignore_list = ['vegan', 'veggie', 'plantbased']
  22.  
  23. accounts = ['accounts with similar content']
  24.  
  25. # get a session!
  26. session = InstaPy(username=insta_username,
  27. password=insta_password,
  28. headless_browser=True)
  29.  
  30. with smart_run(session):
  31. # settings
  32. session.set_relationship_bounds(enabled=True,
  33. max_followers=15000)
  34.  
  35. session.set_dont_include(friends)
  36. session.set_dont_like(dont_likes)
  37. session.set_ignore_if_contains(ignore_list)
  38.  
  39. session.set_user_interact(amount=2, randomize=True, percentage=60)
  40. session.set_do_follow(enabled=True, percentage=40)
  41. session.set_do_like(enabled=True, percentage=80)
  42.  
  43. # activity
  44. session.like_by_tags(random.sample(like_tag_list, 3),
  45. amount=random.randint(50, 100), interact=True)
  46.  
  47. session.unfollow_users(amount=random.randint(75, 150),
  48. InstapyFollowed=(True, "all"), style="FIFO",
  49. unfollow_after=90 * 60 * 60, sleep_delay=501)
  50.  
  51. """ Joining Engagement Pods...
  52. """
  53. photo_comments = ['Nice shot! @{}',
  54. 'I love your profile! @{}',
  55. 'Wonderful :thumbsup:',
  56. 'Just incredible :open_mouth:',
  57. 'What camera did you use @{}?',
  58. 'Love your posts @{}',
  59. 'Looks awesome @{}',
  60. 'Getting inspired by you @{}',
  61. ':raised_hands: Yes!',
  62. 'I can feel your passion @{} :muscle:']
  63.  
  64. session.set_do_comment(enabled = True, percentage = 95)
  65. session.set_comments(photo_comments, media = 'Photo')
  66. session.join_pods(topic='travel')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement