-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
46 lines (31 loc) · 1 KB
/
main.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
"""
pyCrawler V1.0
- Gmail is now requiring QR code verification from a mobile device. No longer maintaining.
"""
import gmail_functions as gmail_functions
import undetected_chromedriver as uc
import time
task_count = 1
password = "Password123"
proxy = "x.x.x.x:xxxx" # this proxy returns a different ip for each task during initiation
drivers = []
def initiate(proxy):
options = uc.ChromeOptions()
# options.add_argument("--headless")
options.add_argument(f"--proxy-server={proxy}")
driver = uc.Chrome(options=options, use_subprocess=False)
print("driver initiated...")
return driver
def main():
print("Welcome to PyCrawler!")
for i in range(task_count):
driver = initiate(proxy)
drivers.append(driver)
for driver in drivers:
gmail_functions.navigate_to_signup(driver)
for driver in drivers:
gmail_functions.fill_out_signup(driver, password)
for driver in drivers:
driver.quit()
if __name__ == "__main__":
main()