国税局增值税发票查验平台 国税验证码识别 国税发票查验

2021-03-03 20:09:42 +08:00
 legend99

国税局验证码识别

Python 请求

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())

发票查验

Python 请求

import requests

# fpdm 为发票代码,fphm 为发票号码,rq 为开票日期,jym 为校验码后六位,专票 jym 为不含税金额
# data 为脱敏数据,用自己的真实发票查询
data = {'fpdm': '040001505520', 'fphm': '38507520', 'rq': '20520520', 'jym': '865520'}
result = requests.post('http://47.99.174.98:8808/fp', json=data)
print(result.json())

结果如下

{'key1': '001', 'key2': '20≡20181106≡上海***********≡913101173324054932≡上海松江区乐都路 301 号 3 楼 021-57662117≡******************* 121915447210901≡个人≡ ≡≡≡83298822850720535288≡17.83≡315.00≡≡661610196301≡≡297.17≡0≡≡1', 'key3': '餐饮服务餐饮服务█████297.17█0.060█17.83██3070401000000000000', 'key4': '', 'key5': '1', 'key11': 'o'}

作者:Open_CV_NLP,Open_CV_NLP_New
http://47.99.174.98:8808/

1305 次点击
所在节点    Python
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/758165

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX