Skip to main content

识别支付宝微信收款码信息

Project description

DPayOcr

PyPI version

介绍

dpayocr 可以识别支付宝微信收款码信息。例如支付类型,支付金额,支付链接。

安装

$ pip install dpayocr

使用

命令行使用

dpayocr 66.JPG

输出

PayQrCode(pay_type=1, price=66.0, url='https://qr.alipay.com/xxx')

接口

>>> from dpayocr import parse_pay_qr_code
>>> fp = '66.JPG' # 可以传入文件名或者二进制IO
>>> parse_pay_qr_code(fp)
PayQrCode(pay_type=1, price=66.0, url='https://qr.alipay.com/xxx')

问题

在虚拟环境找不到 Tesseract 命令

# If you don't have tesseract executable in your PATH, include the following:
pytesseract.pytesseract.tesseract_cmd = r'<full_path_to_your_tesseract_executable>'
# Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract'

参考链接

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dpayocr, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dpayocr-1.0.2-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page