Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- instabot example
- Workflow:
- Like last images with hashtag.
- """
- import sys
- import os
- import time
- import random
- sys.path.append(os.path.join(sys.path[0], '../'))
- from instabot import Bot
- def add_dispersion_special(delay_value_special):
- return delay_value_special * 3 / 4 + delay_value_special * random.random() / 2
- if len(sys.argv) < 2:
- print ("USAGE: Pass hashtag(s) to like")
- print ("Example: python %s hashtag1 hashtag2" % sys.argv[0])
- exit()
- bot = Bot(
- like_delay= add_dispersion_special(30),
- )
- bot.login()
- wait = 5 * 60 # in seconds
- while True:
- for hashtag in sys.argv[1:]:
- bot.like_hashtag(hashtag)
- time.sleep(wait)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement