V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
legend99
V2EX  ›  Python

国税发票查验验证码识别

  •  
  •   legend99 · Feb 18, 2021 · 2371 views
    This topic created in 1896 days ago, the information mentioned may be changed or developed.
    import base64
    import requests
    
    with open('./test02.png', 'rb') as f:
        img_bytes = f.read()
    
    img_base64 = base64.b64encode(img_bytes)
    # '00' 黑色 '01' 红色 '02' 黄色 '03' 蓝色
    data = {'image': str(img_base64, 'utf-8'), 'key': '03'}
    result = requests.post('http://47.99.174.98:8808/captcha', json=data)
    # 返回 json 格式数据{"code": "7RT"}
    print(result.json())
    
    4 replies    2021-02-18 20:06:24 +08:00
    yqmac
        2
    yqmac  
       Feb 18, 2021
    牛批了我滴哥,训练样本是人工打码来的么
    yqmac
        3
    yqmac  
       Feb 18, 2021
    去网站看了一下,返回值能解析出颜色和图片。根据颜色筛就明了了。吆西。打码都不需要了
    justin2018
        4
    justin2018  
       Feb 18, 2021
    http://47.99.174.98:8808/captcha

    这是推广 还是 ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4849 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 09:48 · PVG 17:48 · LAX 02:48 · JFK 05:48
    ♥ Do have faith in what you're doing.