shuosiw / pt_captcha Goto Github PK
View Code? Open in Web Editor NEWusing tencent or baidu ocr api to recognize captcha
License: GNU General Public License v3.0
using tencent or baidu ocr api to recognize captcha
License: GNU General Public License v3.0
当达到 quota 上限导致识别失败时,需要给出详细提示,目前没有处理这种场景
10.0.0.6 - - [08/Jun/2022 14:55:22] "�[35m�[1mPOST /upload HTTP/1.1�[0m" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/app/captcha_app/app.py", line 47, in upload
return ocrvd.ocr_output(gray_imgbase64), 200
File "/app/captcha_app/ocr.py", line 25, in ocr_output
return _vendor.recog_img(image)
File "/app/captcha_app/ocrvendor/baidu.py", line 47, in recog_img
if ret and ret.get('words_result_num') > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
首先需要选择一个 ocr 服务提供方申请接入,并拿到 apikey 及 secret 凭证,具体参考:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.