Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_73487616
dr_py
提交
14aad948
dr_py
项目概览
m0_73487616
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
14aad948
编写于
3月 28, 2023
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ocr从入门到放弃,壳子不支持alist的接口,只能自行建立接口实现,难受。不折腾了
上级
64f9cc20
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
0 deletion
+9
-0
libs/drpy2.js
libs/drpy2.js
+1
-0
static/img/yzm.png
static/img/yzm.png
+0
-0
test/测试OCR.py
test/测试OCR.py
+1
-0
txt/js/origin/原始JS.js
txt/js/origin/原始JS.js
+7
-0
未找到文件。
libs/drpy2.js
浏览文件 @
14aad948
...
...
@@ -52,6 +52,7 @@ const VERSION = vercode+' 3.9.39beta1 20230316';
* 6.base64Encode,base64Decode,md5函数还没有实现 (抄影魔代码实现了)
* 7.eval(getCryptoJS());还没有实现 (可以空实现了,以后遇到能忽略)
* done: jsp:{pdfa,pdfh,pd},json:{pdfa,pdfh,pd},jq:{pdfa,pdfh,pd}
* 8.req函数不支持传递字符串的data参数 {'content-type':'text/plain'} 类型数据,因此无法直接调用alist的ocr接口
* * 电脑看日志调试
adb tcpip 5555
adb connect 192.168.10.192
...
...
static/img/yzm.png
0 → 100644
浏览文件 @
14aad948
470 字节
test/测试OCR.py
浏览文件 @
14aad948
...
...
@@ -18,6 +18,7 @@ def test():
with
open
(
'yzm1.png'
,
mode
=
'rb'
)
as
f
:
img
=
f
.
read
()
try
:
print
(
base64
.
b64encode
(
img
).
decode
())
# code = requests.post(api, data=base64.b64encode(img).decode(), headers={'user-agent': PC_UA}, verify=False).text
# code = requests.post(api, data=base64.b64encode(img).decode(), headers={'user-agent': PC_UA}, verify=False).text
code
=
requests
.
post
(
api3
,
data
=
{
"img"
:
base64
.
b64encode
(
img
).
decode
()},
headers
=
{
'user-agent'
:
PC_UA
},
verify
=
False
).
text
...
...
txt/js/origin/原始JS.js
浏览文件 @
14aad948
...
...
@@ -66,6 +66,13 @@ function play(flag, id, flags) {
function
search
(
wd
,
quick
)
{
console
.
log
(
"
search
"
);
let
yzm_url
=
'
http://192.168.10.99:57051/static/img/yzm.png
'
;
console
.
log
(
'
测试验证码地址:
'
,
yzm_url
);
let
img_base64
=
req
(
yzm_url
,{
buffer
:
2
}).
content
;
console
.
log
(
img_base64
);
// const res = req('https://api.nn.ci/ocr/b64/text', {body:img_base64,method:'POST'});
const
res
=
req
(
'
https://api.nn.ci/ocr/b64/text
'
,
{
data
:
img_base64
,
method
:
'
POST
'
,
headers
:{
'
content-type
'
:
'
text/plain
'
}});
console
.
log
(
'
验证码识别结果:
'
,
res
.
content
);
let
d
=
[];
d
.
push
({
vod_name
:
wd
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录