Advertisement
Guest User

Untitled

a guest
May 15th, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. from instapy import InstaPy
  2. from instapy import smart_run
  3. from instapy import set_workspace
  4. from time import gmtime, strftime
  5. import random
  6. import schedule
  7.  
  8.  
  9. # your login credentials
  10. insta_username = ''
  11. insta_password = ''
  12.  
  13.  
  14. start_at_hour = "06"
  15.  
  16.  
  17. end_hour = "23"
  18.  
  19.  
  20. friends = ['amazingcarnews', 'amggtc63', 'the_dreamdestinations']
  21. like_tags = ['amg', 'luxury', 'performancecars',
  22. 'instacars', 'luxurycar', 'lambo', 'audi', 'mercedes']
  23. targets = ['mister_a45amg', 'swiss_one69', '']
  24.  
  25. dont_likes = ['sex', 'nude', 'naked', 'beef', 'pork', 'seafood',
  26. 'egg', 'chicken', 'cheese', 'sausage', 'lobster',
  27. 'fisch', 'schwein', 'lamm', 'rind', 'kuh', 'meeresfrüchte',
  28. 'schaf', 'ziege', 'hummer', 'yoghurt', 'joghurt', 'dairy',
  29. 'meal', 'food', 'eat', 'pancake', 'cake', 'dessert',
  30. 'protein', 'essen', 'mahl', 'breakfast', 'lunch',
  31. 'dinner', 'turkey', 'truthahn', 'plate', 'bacon',
  32. 'sushi', 'burger', 'salmon', 'shrimp', 'steak',
  33. 'schnitzel', 'goat', 'oxtail', 'mayo', 'fur', 'leather',
  34. 'cream', 'hunt', 'gun', 'shoot', 'slaughter', 'pussy',
  35. 'breakfast', 'dinner', 'lunch']
  36. # path to your workspace
  37. set_workspace(path=None)
  38.  
  39.  
  40. def job():
  41. session = InstaPy(username=insta_username, password=insta_password)
  42. with smart_run(session):
  43. session.set_dont_include(friends)
  44. session.set_dont_like(dont_likes)
  45. session.set_do_follow(enabled=True, percentage=40)
  46. session.set_do_like(enabled=True, percentage=80)
  47.  
  48. session.set_user_interact(
  49. amount=2, percentage=70, randomize=True, media='Photo')
  50. session.follow_likers(targets, photos_grab_amount=2, follow_likers_per_photo=10,
  51. randomize=True, sleep_delay=600, interact=True)
  52. session.like_by_tags(random.sample(like_tags, 3),
  53. amount=random.randint(50, 100), interact=True)
  54. session.join_pods()
  55.  
  56.  
  57. schedule.every(20).minutes.do(job)
  58.  
  59. while True:
  60. current_hour = strftime("%H", gmtime())
  61. current_minute = strftime("%M", gmtime())
  62. if(current_hour > start_at_hour and current_hour < end_hour):
  63. schedule.run_pending()
  64. time.sleep(10)
  65. else:
  66. time.sleep(5000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement