Update 163youdao.py

This commit is contained in:
Learning for learning
2019-09-03 14:09:02 +08:00
committed by GitHub
parent 8e97d369c9
commit 0e0c18b96f
+6
View File
@@ -1,5 +1,7 @@
import time
from selenium import webdriver
login_url = "http://account.youdao.com/login?service=dict"
xpaths = {'usernameTxtBox': ".//*[@id='username']",
@@ -32,6 +34,10 @@ def login():
# Click Login button
mydriver.find_element_by_xpath(xpaths['submitButton']).click()
# add sleep
print('登录成功')
time.sleep(5)
if __name__ == '__main__':
login()