|
发表于 2022-11-9 07:34:06
|
显示全部楼层
本帖最后由 459662146 于 2022-11-9 07:39 编辑
LOGIN_EXPECTED_TIME 由 5 改到20能登陆了
不过还是报错 2022-11-09 07:32:09 [INFO ] ---- Service start!
2022-11-09 07:32:12 [INFO ] ---- patching driver executable /usr/bin/chromedriver
2022-11-09 07:32:18 [INFO ] ---- Webdriver initialized.
2022-11-09 07:32:58 [INFO ] ---- Login successfully on https://www.95598.cn/osgweb/login
2022-11-09 07:33:58 [ERROR ] ---- Webdriver quit abnormly, reason: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//li[@class='inline_block_fix zhanghu-full']//b[@class='cff8']"}
(Session info: headless chrome=89.0.4389.114)
Stacktrace:
#0 0xaaaaad41cd48 <unknown>
#1 0xaaaaad3bf6cc <unknown>
#2 0xaaaaad152d84 <unknown>
#3 0xaaaaad17fe08 <unknown>
#4 0xaaaaad1adac8 <unknown>
#5 0xaaaaad176f50 <unknown>
#6 0xaaaaad1783d4 <unknown>
#7 0xaaaaad3eaec8 <unknown>
#8 0xaaaaad3f8aa0 <unknown>
#9 0xaaaaad3f8804 <unknown>
#10 0xaaaaad3fccbc <unknown>
#11 0xaaaaad3f9240 <unknown>
#12 0xaaaaad3e116c <unknown>
#13 0xaaaaad40fb3c <unknown>
#14 0xaaaaad427398 <unknown>
#15 0xffff857327e4 start_thread
#16 0xffff84df170c <unknown>
. 4 retry times left.
Traceback (most recent call last):
File "/app/data_fetcher.py", line 28, in fetch
return self._fetch()
File "/app/data_fetcher.py", line 45, in _fetch
balance = self._get_eletric_balance(driver)
File "/app/data_fetcher.py", line 100, in _get_eletric_balance
driver.find_element(By.XPATH,"//li[@class='inline_block_fix zhanghu-full']//b[@class='cff8']")
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 856, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//li[@class='inline_block_fix zhanghu-full']//b[@class='cff8']"}
(Session info: headless chrome=89.0.4389.114)
Stacktrace:
#0 0xaaaaad41cd48 <unknown>
#1 0xaaaaad3bf6cc <unknown>
#2 0xaaaaad152d84 <unknown>
#3 0xaaaaad17fe08 <unknown>
#4 0xaaaaad1adac8 <unknown>
#5 0xaaaaad176f50 <unknown>
#6 0xaaaaad1783d4 <unknown>
#7 0xaaaaad3eaec8 <unknown>
#8 0xaaaaad3f8aa0 <unknown>
#9 0xaaaaad3f8804 <unknown>
#10 0xaaaaad3fccbc <unknown>
#11 0xaaaaad3f9240 <unknown>
#12 0xaaaaad3e116c <unknown>
#13 0xaaaaad40fb3c <unknown>
#14 0xaaaaad427398 <unknown>
#15 0xffff857327e4 start_thread
#16 0xffff84df170c <unknown>
2022-11-09 07:34:31 [INFO ] ---- Webdriver initialized.
2022-11-09 07:35:19 [INFO ] ---- Login successfully on https://www.95598.cn/osgweb/login
2022-11-09 07:36:21 [ERROR ] ---- Webdriver quit abnormly, reason: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//li[@class='inline_block_fix zhanghu-full']//b[@class='cff8']"}
(Session info: headless chrome=89.0.4389.114)
|
|