-
Notifications
You must be signed in to change notification settings - Fork 401
/
setup.py
72 lines (56 loc) · 2.14 KB
/
setup.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
71
72
import subprocess
import sys
from __dwnldDrivers.versions import *
######## This script is only for educational purpose ########
######## use it on your own RISK ########
######## I'm not responsible for any loss or damage ########
######## caused to you using this script ########
######## Github Repo - https://git.io/JJisT/ ########
def install(name):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', name])
def main():
my_packages = ['requests', 'clint', 'faker', 'selenium', 'colorama', 'undetected-chromedriver', 'selenium-wire']
installed_pr = []
for package in my_packages:
install(package)
print('\n')
print('Firefox')
firefox_ver = get_firefox_version()
if firefox_ver != None:
is_firefox_there = 1
installed_pr.append('Firefox')
setup_Firefox(firefox_ver)
else:
is_firefox_there = 0
print('Firefox isn\'t installed')
print('\nChrome')
chrome_ver = get_chrome_version()
if chrome_ver != None:
is_chrome_there = 1
installed_pr.append('Chrome')
installed_pr.append('chrome_undetected (For easy captcha)')
setup_Chrome(chrome_ver)
else:
is_chrome_there = 0
print('Chrome isn\'t installed')
if is_firefox_there == 0 and is_chrome_there == 0:
print('Error - Setup installation failed \nReason - Please install either Chrome or Firefox browser to complete setup process')
exit()
print('\nWich browser do you prefer to run script on')
for index, pr in enumerate(installed_pr, start=1):
print('\n[*] ' + str(index) + ' ' + pr)
inpErr = True
while inpErr != False:
print('\nEnter id ex - 1 or 2: ', end='')
userInput = int(input())
if userInput <= len(installed_pr) and userInput > 0:
selected = installed_pr[userInput - 1]
selectedx = selected.split(' ')[0]
fp = open('prefBrowser.txt', 'w')
fp.write(selectedx.lower())
inpErr = False
else:
print('Wrong id, Either input 1 or 2')
print('Setup Completed')
if __name__ == '__main__':
main()