-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
32 lines (22 loc) · 1.14 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from logging import warning
from os import path
import sys
import getpass
warning = "Make sure you use a temporary bot account with this script,and not your original account.\nThe temporary account will retrieve the followers of your original account.\nMultiple logins can lead to account ban."
if path.exists('config_file.txt'):
inp = input('The config file already exists, do you want to overwrite it? (Y/N)')
inp = inp.upper()
if inp == 'N':
sys.exit(0)
print(f"NOTE :\n{warning}")
print("-"*100+"\n")
insta_username = input("InstaBot account Username : ")
insta_password = getpass.getpass()
username = input("Enter username of your original account (whose followers you want to monitor) : ")
discord_webhook_url = input("Enter your discord webhook URL : ")
if not "discordapp.com" in discord_webhook_url:
discord_webhook_url = discord_webhook_url.replace("discord.com","discordapp.com")
f = open("config_file.txt","w")
f.write(str({"insta_username":insta_username,"insta_password":insta_password,"username":username,"discord_webhook_url":discord_webhook_url}))
f.close()
print("Configured successfully!")