01miaom / jiankangyizhan

健康驿站
MIT License
41 stars 27 forks source link

Chrome运行关闭! #22

Open nameowner opened 2 years ago

nameowner commented 2 years ago

DevTools listening on ws://127.0.0.1:58520/devtools/browser/5ad7cc9c-6772-417b-8a3a-eb41598aad51 欢迎使用ddddocr,本项目专注带动行业内卷,个人博客:wenanzhe.com 训练数据支持来源于:http://146.56.204.113:19199/preview 爬虫框架feapder可快速一键接入,快速开启爬虫之旅:https://github.com/Boris-code/feapder

Traceback (most recent call last): File "C:\Users\Acer\Downloads\01miaom\main.py", line 53, in browser.find_element_by_id('btn_login').click() File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute return self._parent.execute(command, params) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (509, 640). Other element would receive the click:

(Session info: chrome=102.0.5005.63) Stacktrace: Backtrace: Ordinal0 [0x008CD953+2414931] Ordinal0 [0x0085F5E1+1963489] Ordinal0 [0x0074C6B8+837304] Ordinal0 [0x0077FC27+1047591] Ordinal0 [0x0077DC08+1039368] Ordinal0 [0x0077B90B+1030411] Ordinal0 [0x0077A659+1025625] Ordinal0 [0x00770293+983699] Ordinal0 [0x0079449C+1131676] Ordinal0 [0x0076FC74+982132] Ordinal0 [0x007946B4+1132212] Ordinal0 [0x007A4812+1198098] Ordinal0 [0x007942B6+1131190] Ordinal0 [0x0076E860+976992] Ordinal0 [0x0076F756+980822] GetHandleVerifier [0x00B3CC62+2510274] GetHandleVerifier [0x00B2F760+2455744] GetHandleVerifier [0x0095EABA+551962] GetHandleVerifier [0x0095D916+547446] Ordinal0 [0x00865F3B+1990459] Ordinal0 [0x0086A898+2009240] Ordinal0 [0x0086A985+2009477] Ordinal0 [0x00873AD1+2046673] BaseThreadInitThunk [0x769DFA29+25] RtlGetAppContainerNamedObjectPath [0x77B87A9E+286] RtlGetAppContainerNamedObjectPath [0x77B87A6E+238]

01miaom commented 2 years ago

DevTools listening on ws://127.0.0.1:58520/devtools/browser/5ad7cc9c-6772-417b-8a3a-eb41598aad51 欢迎使用ddddocr,本项目专注带动行业内卷,个人博客:wenanzhe.com 训练数据支持来源于:http://146.56.204.113:19199/preview 爬虫框架feapder可快速一键接入,快速开启爬虫之旅:https://github.com/Boris-code/feapder

Traceback (most recent call last): File "C:\Users\Acer\Downloads\01miaom\main.py", line 53, in browser.find_element_by_id('btn_login').click() File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute return self._parent.execute(command, params) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (509, 640). Other element would receive the click:

(Session info: chrome=102.0.5005.63) Stacktrace: Backtrace: Ordinal0 [0x008CD953+2414931] Ordinal0 [0x0085F5E1+1963489] Ordinal0 [0x0074C6B8+837304] Ordinal0 [0x0077FC27+1047591] Ordinal0 [0x0077DC08+1039368] Ordinal0 [0x0077B90B+1030411] Ordinal0 [0x0077A659+1025625] Ordinal0 [0x00770293+983699] Ordinal0 [0x0079449C+1131676] Ordinal0 [0x0076FC74+982132] Ordinal0 [0x007946B4+1132212] Ordinal0 [0x007A4812+1198098] Ordinal0 [0x007942B6+1131190] Ordinal0 [0x0076E860+976992] Ordinal0 [0x0076F756+980822] GetHandleVerifier [0x00B3CC62+2510274] GetHandleVerifier [0x00B2F760+2455744] GetHandleVerifier [0x0095EABA+551962] GetHandleVerifier [0x0095D916+547446] Ordinal0 [0x00865F3B+1990459] Ordinal0 [0x0086A898+2009240] Ordinal0 [0x0086A985+2009477] Ordinal0 [0x00873AD1+2046673] BaseThreadInitThunk [0x769DFA29+25] RtlGetAppContainerNamedObjectPath [0x77B87A9E+286] RtlGetAppContainerNamedObjectPath [0x77B87A6E+238]

在代码的第53行前面插入以下代码试试,因为多了一个弹窗,需要先把弹窗关掉

browser.find_element_by_xpath('//div[@id="winLoginNotice"]/div/div/button').click()

nameowner commented 2 years ago

还是关闭,显示如下:

C:\Users\Acer\Downloads\01miaom>main.py

DevTools listening on ws://127.0.0.1:56779/devtools/browser/56b49c37-43ce-4293-93d6-80344202c4af 欢迎使用ddddocr,本项目专注带动行业内卷,个人博客:wenanzhe.com 训练数据支持来源于:http://146.56.204.113:19199/preview 爬虫框架feapder可快速一键接入,快速开启爬虫之旅:https://github.com/Boris-code/feapder

Traceback (most recent call last): File "C:\Users\Acer\Downloads\01miaom\main.py", line 55, in browser.find_element_by_xpath("//button[text()=\"確定\"]").click() File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute return self._parent.execute(command, params) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable (Session info: chrome=102.0.5005.63) Stacktrace: Backtrace: Ordinal0 [0x003CD953+2414931] Ordinal0 [0x0035F5E1+1963489] Ordinal0 [0x0024C580+836992] Ordinal0 [0x0027A4F3+1025267] Ordinal0 [0x00270293+983699] Ordinal0 [0x0029449C+1131676] Ordinal0 [0x0026FC74+982132] Ordinal0 [0x002946B4+1132212] Ordinal0 [0x002A4812+1198098] Ordinal0 [0x002942B6+1131190] Ordinal0 [0x0026E860+976992] Ordinal0 [0x0026F756+980822] GetHandleVerifier [0x0063CC62+2510274] GetHandleVerifier [0x0062F760+2455744] GetHandleVerifier [0x0045EABA+551962] GetHandleVerifier [0x0045D916+547446] Ordinal0 [0x00365F3B+1990459] Ordinal0 [0x0036A898+2009240] Ordinal0 [0x0036A985+2009477] Ordinal0 [0x00373AD1+2046673] BaseThreadInitThunk [0x762FFA29+25] RtlGetAppContainerNamedObjectPath [0x77CF7A9E+286] RtlGetAppContainerNamedObjectPath [0x77CF7A6E+238]

01miaom commented 2 years ago

验证码,证件号这些信息有被正确填写吗?如果验证码没有填写可能是验证码截图出现了问题,需要手动修改截图范围

nameowner commented 2 years ago

手动修改截图范围,可以详细一点说明吗?新手。谢谢哦!

nameowner commented 2 years ago

目前是证件信息,验证码都没有被填写。请教如何手动修改,谢谢!麻烦稍微详细点,我是小白...

01miaom commented 2 years ago

这个问题可能是页面没有完全加载导致的,可以尝试在在browser.get()后面增加time.sleep(0.5),或者在网络环境更好的地方运行脚本