SHARE
TWEET

Bot

a guest Jun 15th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. import os
  3. from tqdm import tqdm
  4. import argparse
  5.  
  6. sys.path.append(os.path.join(sys.path[0], '../'))
  7. from instabot import Bot
  8.  
  9. parser = argparse.ArgumentParser(add_help=True)
  10. parser.add_argument('-u', type=str, help="username")
  11. parser.add_argument('-p', type=str, help="password")
  12. parser.add_argument('-proxy', type=str, help="proxy")
  13. parser.add_argument('users', type=str, nargs='+', help='users')
  14. args = parser.parse_args()
  15.  
  16. bot = Bot()
  17. bot.login(username=args.u, password=args.p,
  18.           proxy=args.proxy)
  19.  
  20. for username in args.users:
  21.     medias = bot.get_user_medias(username, filtration=False)
  22.     if len(medias):
  23.         likers = bot.get_media_likers(medias[0])
  24.         for liker in tqdm(likers):
  25.             bot.like_user(liker, amount=2)
  26.             bot.follow(liker)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top