-2

I want to give 10 complimentary followers to the users who enter their Instagram username on my website.

I have pre-registered 10 Instagram profiles for this. ( E.g. IGprofile1, Igprofile2...Igprofile10).

When a user enters his username (E.g. kimkardashian) on the form and click submit, it'll be sent to my web server and give 10 followers to "kimkardashian"

IGprofile1-->login-->follow "kimkardashian" -->logout

IGprofile2-->login-->follow "kimkardashian" -->logout

....

....

IGprofile10-->login-->follow "kimkardashian" -->logout

I need this to on my server.

Below is a code one of my friend gave me

Any expert idea will be greatly appreciated. .

"""
    Follow
"""

import argparse
import sys
import os

from tqdm import tqdm

sys.path.append(os.path.join(sys.path[0], '../'))
from instabot import Bot

parser = argparse.ArgumentParser(add_help=True)
parser.add_argument('user', type=str, help='user')
args = parser.parse_args()

# Add your bots here
BOTS_DATA = [
    {
        "username": "user1",
        "password": "pass1",
        "proxy": "https://127.0.0.1:3128"
    },
    {
        "username": "user2",
        "password": "pass2",
        "proxy": "https://127.0.0.1:3128"
    },
    {
        "username": "user3",
        "password": "pass3",
        "proxy": "https://127.0.0.1:3128"
    },
    {
        "username": "user4",
        "password": "pass4",
        "proxy": "https://127.0.0.1:3128"
    },
]

for bot in tqdm(BOTS_DATA):
    bot['bot'] = Bot()
    bot['bot'].login(username=bot['username'], password=bot['password'], proxy=bot['proxy'])
    bot['bot'].follow(args.user)
aL_eX
  • 1,453
  • 2
  • 15
  • 30

1 Answers1

0

The only way to follow another user's account would be through using Instagram's API. Unfortunately, Instagram has recently stopped accepting applications for the relationships scope which permits such an action — refer to the Instagram documents here.

I cannot offer any advice on the matter, but you will also want to ensure you're building an application which aligns with Instagram's Terms of Use and Platform Policy.

An alternative option to explore might be to look at automation with twill, for example — How can I login to a website with Python?

o1n3n21
  • 355
  • 1
  • 6
  • 18