Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from instapy import InstaPy
- from instapy import smart_run
- from instapy import set_workspace
- from time import gmtime, strftime
- import random
- import schedule
- # your login credentials
- insta_username = ''
- insta_password = ''
- start_at_hour = "06"
- end_hour = "23"
- friends = ['amazingcarnews', 'amggtc63', 'the_dreamdestinations']
- like_tags = ['amg', 'luxury', 'performancecars',
- 'instacars', 'luxurycar', 'lambo', 'audi', 'mercedes']
- targets = ['mister_a45amg', 'swiss_one69', '']
- dont_likes = ['sex', 'nude', 'naked', 'beef', 'pork', 'seafood',
- 'egg', 'chicken', 'cheese', 'sausage', 'lobster',
- 'fisch', 'schwein', 'lamm', 'rind', 'kuh', 'meeresfrüchte',
- 'schaf', 'ziege', 'hummer', 'yoghurt', 'joghurt', 'dairy',
- 'meal', 'food', 'eat', 'pancake', 'cake', 'dessert',
- 'protein', 'essen', 'mahl', 'breakfast', 'lunch',
- 'dinner', 'turkey', 'truthahn', 'plate', 'bacon',
- 'sushi', 'burger', 'salmon', 'shrimp', 'steak',
- 'schnitzel', 'goat', 'oxtail', 'mayo', 'fur', 'leather',
- 'cream', 'hunt', 'gun', 'shoot', 'slaughter', 'pussy',
- 'breakfast', 'dinner', 'lunch']
- # path to your workspace
- set_workspace(path=None)
- def job():
- session = InstaPy(username=insta_username, password=insta_password)
- with smart_run(session):
- session.set_dont_include(friends)
- session.set_dont_like(dont_likes)
- session.set_do_follow(enabled=True, percentage=40)
- session.set_do_like(enabled=True, percentage=80)
- session.set_user_interact(
- amount=2, percentage=70, randomize=True, media='Photo')
- session.follow_likers(targets, photos_grab_amount=2, follow_likers_per_photo=10,
- randomize=True, sleep_delay=600, interact=True)
- session.like_by_tags(random.sample(like_tags, 3),
- amount=random.randint(50, 100), interact=True)
- session.join_pods()
- schedule.every(20).minutes.do(job)
- while True:
- current_hour = strftime("%H", gmtime())
- current_minute = strftime("%M", gmtime())
- if(current_hour > start_at_hour and current_hour < end_hour):
- schedule.run_pending()
- time.sleep(10)
- else:
- time.sleep(5000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement