23 lines
973 B
Python
23 lines
973 B
Python
#!python3
|
|
# cmd_email.py - send email by command
|
|
|
|
from selenium import webdriver
|
|
from time import sleep
|
|
|
|
browser = webdriver.Chrome()
|
|
browser.get('https://ui.ptlogin2.qq.com/cgi-bin/login?style=9&appid=522005705&daid=4&s_url=https%3A%2F%2Fw.mail.qq.com%2Fcgi-bin%2Flogin%3Fvt%3Dpassport%26vm%3Dwsk%26delegate_url%3D%26f%3Dxhtml%26target%3D&hln_css=http%3A%2F%2Fmail.qq.com%2Fzh_CN%2Fhtmledition%2Fimages%2Flogo%2Fqqmail%2Fqqmail_logo_default_200h.png&low_login=1&hln_autologin=%E8%AE%B0%E4%BD%8F%E7%99%BB%E5%BD%95%E7%8A%B6%E6%80%81&pt_no_onekey=1')
|
|
sleep(2)
|
|
try:
|
|
qq = browser.find_element_by_id('u')
|
|
qq.send_keys('375575128')
|
|
password = browser.find_element_by_id('p')
|
|
password.send_keys('FzVSIPYk87890310')
|
|
go = browser.find_element_by_id('go')
|
|
go.click()
|
|
sleep(1)
|
|
password2 = browser.find_element_by_id('pwd')
|
|
password2.send_keys('Cpz87890310')
|
|
password2.submit()
|
|
except:
|
|
print('Was not able to find an element with your qq.')
|