-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgoogle_acc_creator.py
More file actions
83 lines (54 loc) · 2.88 KB
/
google_acc_creator.py
File metadata and controls
83 lines (54 loc) · 2.88 KB
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
73
74
75
76
77
78
79
80
81
import os
from selenium import webdriver
from time import sleep
import urllib
# options = ChromeOptions()
# options.AddArgument("--user-data-dir=C:\\Users\\Codehimn\\AppData\\Local\\Google\\Chrome\\User Data\\Default")
# driver = ChromeDriver(options)
options = webdriver.ChromeOptions()
options.add_argument("--user-data-dir=C:\\Users\\Codehimn\\AppData\\Local\\Google\\Chrome\\User Data\\selenium")
options.add_argument("--start-minimized")
chromedriver = "C:\\Users\\Codehimn\\Dropbox\\ingress\\selenium-2.41.0\\chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
browser = webdriver.Chrome(chromedriver, chrome_options=options)
browser.get('https://accounts.google.com/signup')
# sleep(20)
browser.find_element_by_xpath('//*[@id="FirstName"]').send_keys('Juan')
browser.find_element_by_xpath('//*[@id="LastName"]').send_keys('Perez')
browser.find_element_by_xpath('//*[@id="GmailAddress"]').send_keys('ingress.acc17')
browser.find_element_by_xpath('//*[@id="Passwd"]').send_keys('iluminadopalma')
browser.find_element_by_xpath('//*[@id="PasswdAgain"]').send_keys('iluminadopalma')
browser.find_element_by_xpath('//*[@id="BirthDay"]').send_keys('01')
browser.find_element_by_xpath('//*[@id="BirthYear"]').send_keys('1987')
browser.find_element_by_xpath('//*[@id="RecoveryEmailAddress"]').send_keys("codehimn@gmail.com");
browser.find_element_by_xpath('//*[@id="SkipCaptcha"]').click();
browser.find_element_by_xpath('//*[@id="TermsOfService"]').click();
# browser.find_element_by_xpath('//*[@id="BirthMonth"]/option[2]').click();
# browser.find_element_by_xpath('//*[@id="Gender"]/option[3]').click();
browser.find_element_by_xpath('//*[@id="BirthMonth"]/div/div[1]').click();
browser.find_element_by_xpath('//*[@id=":0"]/div').click();
browser.find_element_by_xpath('//*[@id="Gender"]/div/div[1]').click();
browser.find_element_by_xpath('//*[@id=":d"]').click();
browser.find_element_by_xpath('//*[@id="submitbutton"]').click();
# src= browser.find_element_by_xpath('//*[@id="recaptcha_challenge_image"]').get_attribute('src')
# urllib.urlretrieve(src, "captcha.png")
# browser.find_element_by_xpath('//*[@id="recaptcha_response_field"]').click();
sleep(5)
i=0
while i < 100:
sleep(0.5)
i=+1
# if 'done' in browser.find_element_by_xpath('//*[@id="innerstatus"]/span[2]/span').text : i = 100
print('-done-')
# browser.execute_script('window.plugin.portalslist.displayPL()')
# print(str ( browser.find_element_by_xpath('//*[@id="portalslist"]').text() ) )
# print(browser.find_element_by_xpath('//*[@id="portalslist"]').value() )
# print(browser.find_element_by_xpath('//*[@id="portalslist"]').html() )
fuente = str ( browser.page_source )
# output = open('portales.list', 'w', encoding="UTF-8")
# output.write( fuente)
# output.close()
# browser.close()
# String imgmsg = driver.findElements(By.xpath("//div[@id='recaptcha_image']
# /img")).toString();
# System.out.println(imgmsg);