MCPcopy Create free account
hub / github.com/Jack-Cherish/python-spider / login

Method login

12306.py:40–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 self.executable_path = 'D:/chromedriver'
39
40 def login(self):
41 self.driver.visit(self.login_url)
42 self.driver.fill("loginUserDTO.user_name", self.username)
43 # sleep(1)
44 self.driver.fill("userDTO.password", self.passwd)
45 print(u"等待验证码,自行输入...")
46 while True:
47 if self.driver.url != self.initmy_url:
48 sleep(1)
49 else:
50 break
51
52 def start(self):
53 self.driver = Browser(driver_name=self.driver_name,executable_path=self.executable_path)

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected