Comments (14)
验证码识别是准确的吗?
from jiankangyizhan.
好像是不准确, 填入的字和圖像不同。未能登入就跳出了。謝謝。
from jiankangyizhan.
好像是不准确, 填入的字和圖像不同。未能登入就跳出了。謝謝。
可以试一下在识别部分的代码前加上这个,在文字识别前先进行图像的处理,看能否提高识别准确率,稍后我会把这个改动并入到main分支
import cv2
import numpy as np
im = cv2.imread('spider/code.png')
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
ret, im_inv = cv2.threshold(im_gray,50,255,cv2.THRESH_BINARY_INV)
kernel = 1/16*np.array([[1,2,1], [2,4,2], [1,2,1]])
im_blur = cv2.filter2D(im_inv,-1,kernel)
ret, im_res = cv2.threshold(im_blur,127,255,cv2.THRESH_BINARY)
cv2.imwrite('spider/test.png',im_res)
with open('spider/test.png','rb') as f:
img_bytes=f.read()
res=ocr.classification(img_bytes)
print(res)
from jiankangyizhan.
DevTools listening on ws://127.0.0.1:54617/devtools/browser/7cdab099-6758-47be-bff6-ce7a2d8c9997
欢迎使用ddddocr,本项目专注带动行业内卷,个人博客:wenanzhe.com
训练数据支持来源于:http://146.56.204.113:19199/preview
爬虫框架feapder可快速一键接入,快速开启爬虫之旅:https://github.com/Boris-code/feapder
j
1y37j
Traceback (most recent call last):
File "C:\Users\user\spider\main.py", line 67, in
browser.find_element_by_id('btn_login').click()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute
return self._parent.execute(command, params)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute
self.error_handler.check_response(response)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\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 (464, 640). Other element would receive the click:
(Session info: chrome=102.0.5005.115)
Stacktrace:
Backtrace:
Ordinal0 [0x007CD953+2414931]
Ordinal0 [0x0075F5E1+1963489]
Ordinal0 [0x0064C6B8+837304]
Ordinal0 [0x0067FC27+1047591]
Ordinal0 [0x0067DC08+1039368]
Ordinal0 [0x0067B90B+1030411]
Ordinal0 [0x0067A659+1025625]
Ordinal0 [0x00670293+983699]
Ordinal0 [0x0069449C+1131676]
Ordinal0 [0x0066FC74+982132]
Ordinal0 [0x006946B4+1132212]
Ordinal0 [0x006A4812+1198098]
Ordinal0 [0x006942B6+1131190]
Ordinal0 [0x0066E860+976992]
Ordinal0 [0x0066F756+980822]
GetHandleVerifier [0x00A3CC62+2510274]
GetHandleVerifier [0x00A2F760+2455744]
GetHandleVerifier [0x0085EABA+551962]
GetHandleVerifier [0x0085D916+547446]
Ordinal0 [0x00765F3B+1990459]
Ordinal0 [0x0076A898+2009240]
Ordinal0 [0x0076A985+2009477]
Ordinal0 [0x00773AD1+2046673]
BaseThreadInitThunk [0x762EFA29+25]
RtlGetAppContainerNamedObjectPath [0x77BD7A7E+286]
RtlGetAppContainerNamedObjectPath [0x77BD7A4E+238]
验证码能识别了, 但仍不能登入。謝謝。
from jiankangyizhan.
DevTools listening on ws://127.0.0.1:54617/devtools/browser/7cdab099-6758-47be-bff6-ce7a2d8c9997
欢迎使用ddddocr,本项目专注带动行业内卷,个人博客:wenanzhe.com
训练数据支持来源于:http://146.56.204.113:19199/preview
爬虫框架feapder可快速一键接入,快速开启爬虫之旅:https://github.com/Boris-code/feapder
j
1y37j
Traceback (most recent call last):
File "C:\Users\user\spider\main.py", line 67, in
browser.find_element_by_id('btn_login').click()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute
return self._parent.execute(command, params)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute
self.error_handler.check_response(response)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\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 (464, 640). Other element would receive the click:
(Session info: chrome=102.0.5005.115)
Stacktrace:
Backtrace:
Ordinal0 [0x007CD953+2414931]
Ordinal0 [0x0075F5E1+1963489]
Ordinal0 [0x0064C6B8+837304]
Ordinal0 [0x0067FC27+1047591]
Ordinal0 [0x0067DC08+1039368]
Ordinal0 [0x0067B90B+1030411]
Ordinal0 [0x0067A659+1025625]
Ordinal0 [0x00670293+983699]
Ordinal0 [0x0069449C+1131676]
Ordinal0 [0x0066FC74+982132]
Ordinal0 [0x006946B4+1132212]
Ordinal0 [0x006A4812+1198098]
Ordinal0 [0x006942B6+1131190]
Ordinal0 [0x0066E860+976992]
Ordinal0 [0x0066F756+980822]
GetHandleVerifier [0x00A3CC62+2510274]
GetHandleVerifier [0x00A2F760+2455744]
GetHandleVerifier [0x0085EABA+551962]
GetHandleVerifier [0x0085D916+547446]
Ordinal0 [0x00765F3B+1990459]
Ordinal0 [0x0076A898+2009240]
Ordinal0 [0x0076A985+2009477]
Ordinal0 [0x00773AD1+2046673]
BaseThreadInitThunk [0x762EFA29+25]
RtlGetAppContainerNamedObjectPath [0x77BD7A7E+286]
RtlGetAppContainerNamedObjectPath [0x77BD7A4E+238]验证码能识别了, 但仍不能登入。謝謝。
看样子还是卡在了登录界面,网页有出现提示框吗?比如验证码错误,没有选择证件类型这种
from jiankangyizhan.
网页有出现提示框吗?没有
比如验证码错误,没有选择证件类型这种 -> 看了所有輸入都正確, 证件类型也選了。
謝謝!
from jiankangyizhan.
网页有出现提示框吗?没有
比如验证码错误,没有选择证件类型这种 -> 看了所有輸入都正確, 证件类型也選了。謝謝!
有尝试过手动点击那个登入按钮吗,如果信息都正确应该是可以正常跳转的
from jiankangyizhan.
剛留意到頁面彈出了一個"溫馨提示" , 需要按確定
from jiankangyizhan.
剛留意到頁面彈出了一個"溫馨提示" , 需要按確定
可以尝试用以下方法定位并点击元素:
browser.find_element_by_xpath('//div[@class="flex1"]/button').click()
from jiankangyizhan.
Traceback (most recent call last):
File "c:\Users\user\spider\main.py", line 66, in
browser.find_element_by_xpath('//div[@Class="flex1"]/button').click()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute
return self._parent.execute(command, params)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute
self.error_handler.check_response(response)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\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.115)
from jiankangyizhan.
Traceback (most recent call last): File "c:\Users\user\spider\main.py", line 66, in browser.find_element_by_xpath('//div[@Class="flex1"]/button').click() File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 89, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 773, in _execute return self._parent.execute(command, params) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in execute self.error_handler.check_response(response) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\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.115)
或者试一下这个
browser.find_element_by_xpath('//div[@id="winLoginNotice"]/div/div/button').click()
from jiankangyizhan.
已成功登入, 但選擇日期頁面閃退了
from jiankangyizhan.
已成功登入, 但選擇日期頁面閃退了
能够复现或者有报错提示吗,有很多种可能都会导致浏览器的闪退,例如内存不足、Chromedriver版本与Chrome不匹配…
from jiankangyizhan.
可以修改代码持續輸入驗證碼,我一般都是提前4分钟運行程序
from jiankangyizhan.
Related Issues (20)
- Traceback (most recent call last): File "main.py", line 65, in <module> timeArray=time.localtime(int(data[149:162])) OSError: [Errno 22] Invalid argument HOT 3
- 登录成功之后的弹出框 HOT 12
- 小白请教:请问如何配置使用? HOT 1
- 整个运行过程 HOT 32
- 运行后chrome自动关闭 HOT 8
- 关于Windows系统 HOT 5
- 有人用这个脚本抢到了吗 HOT 21
- 调用的时间和健康系统的时间是一致的吗 HOT 2
- 如何获取某一天进行抢票呢 HOT 2
- 截取验证码问题 HOT 1
- 预订确认页面验证码问题 HOT 3
- 程序到点打开网站那一刻由于请求量太大,都会打不开,能否改成多次请求? HOT 1
- 预约确认界面的验证方式已更改 HOT 1
- 我做了一个这个网站蹲票的程序,和你一样也是利用Selenium实现的~ HOT 3
- Chrome自动关闭 HOT 2
- ModuleNotFoundError: No module named 'requests' HOT 1
- Chrome运行关闭! HOT 6
- 请问目前有没有金巴的? HOT 1
- 腾讯空间点选验证 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jiankangyizhan.