-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
70 lines (54 loc) · 2.83 KB
/
bot.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from selenium import webdriver
import time
import os
from colorama import Fore, init
import sys
close = lambda: os.system('cls')
close()
print(Fore.GREEN,"""----𝑰𝒏 𝒕𝒉𝒆 𝒏𝒂𝒎𝒆 𝒐𝒇 𝑨𝒍𝒍𝒂𝒉❤️----""")
print("""\n _ _ _ _
(_)_ _ __| |_ __ _ __ _ _ _ __ _ _ __ | |__ ___| |_
| | ' \(_-< _/ _` / _` | '_/ _` | ' \ | '_ \/ _ \ _|
|_|_||_/__/\__\__,_\__, |_| \__,_|_|_|_| |_.__/\___/\__|
/ _|___| | |_____ |___/
| _/ _ \ | / _ \ V V /
|_| \___/_|_\___/\_/\_/""")
print(Fore.BLUE,"""\n [01] Start!
[00] exit()""")
while True:
key = input(Fore.RED+"\n{X_X} :>> ")
if key == "01":
usr = input(Fore.BLUE+"\nPlease You r User (email, number): ")
paswd = input(Fore.CYAN+"Ok You password ? ")
fllow_list = input(Fore.YELLOW+"You r id accont the follow(id1,1d2,...) #")
follow = fllow_list.split(',')
time.sleep(2)
print(Fore.WHITE,"to instagram ...")
web = webdriver.Firefox()
#----------------------------------------------------------------------
#start bot!
try:
web.get('https://www.instagram.com/accounts/login/')
user_name = web.find_element_by_xpath('/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[1]/div/label/input')
user_name.send_keys(usr)
time.sleep(3)
password = web.find_element_by_xpath('/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[2]/div/label/input')
password.send_keys(paswd)
time.sleep(4)
login = web.find_element_by_xpath('/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[3]/button')
login.click()
time.sleep(29)
for i in follow:
web.get(f"https://www.instagram.com/{i}/")
time.sleep(9)
follow = web.find_element_by_xpath('/html/body/div[1]/section/main/div/header/section/div[1]/div[1]/div/div/div/span/span[1]/button').click()
time.sleep(4)
web.close()
except:
print(Fore.RED,"eror followe !")
elif key == "00":
print(Fore.CYAN,"\nGod by 👋")
sys.exit()
else:
print(Fore.RED,"\neror: whats? not comand! ")
print(Fore.YELLOW,"try agin.")