Comments (9)
1.tracemoe.search()确实只需要图片地址 至于你说的动漫标题都是None,可以将报错与源码展示下吗?
2.文档问题,将会在之后修改,感谢提醒
3.ascii2d编码的warning对实际输出不影响,如果觉得输出难看,可以在ascii2d.py
的36行更改为
from picimagesearch.
1.源码是这个样子的,没有出现报错,
我是想将搜图添加到qq机器人里,然后所出来的动画标题都是None的,各种语言版本的标题都是None,就像这样
3.如果只是警告我可能不会发这条issue,我现在用ascii2d搜索twitter的图片能得到结果,但是没有作者和url地址,用了像这样的测试方法
输出的结果是什么都没有
机器人输出的结果也没有作者和url地址,但有缩略图
from picimagesearch.
问题1 已经解决
pip3 install PicImageSearch==2.2.6
升级或者使用pip3 install PicImageSearch --upgrade
问题2 能否提供图片让我重现错误
from picimagesearch.
我这边测试都没问题,能否提供能导致错误的图片地址?
from picimagesearch.
from picimagesearch.
encoding = None那个参数是后面加的,加这个和没加没有区别
from picimagesearch.
raw[0]
所谓的有可能为空不是指为None
而是指内部的url 作者 标题为空
看来是我文档写的不明白,
不建议对raw[0]
判空,即使是空也存在:<NormAscii2D(title='', authors=, mark=)>
建议对res.raw[0].url
进行判空
根据你写的应该这么判断:
if result.url == "":
result = res.raw[1]
PS:判断None
我个人建议用if res is None
PPS: 建议贴代码直接复制粘贴,并用markdown格式中的代码块展示,截图展示代码一般只在OI圈里用吧( )
from picimagesearch.
现在没有问题了,除了搜索时间很慢,可能是我2c2g的服务器性能太弱了。还有就是搜索结果不准,不过我自己去网站搜也只能搜到一样的结果。
总之目前没有问题了,感谢~
from picimagesearch.
其实搜索慢很大程度上是因为网络问题,或者可以改用其他搜索比如saucenao(不过这个要代理),或者iqdb
from picimagesearch.
Related Issues (20)
- 能否支持获取更多图片 HOT 1
- iqdb报错 HOT 1
- Ascii2d 报错403 似乎是因为触发cf引起 HOT 4
- 去除 `cloudscraper` 后改用 `httpx` ,似乎并没有触发 cf HOT 11
- 百度识图的问题 HOT 1
- 文档中对ASCII2D的结构描述有错误 HOT 1
- 关于tracemoe的一个小问题 HOT 2
- 一些特殊的需求 HOT 7
- 新版构建失败 HOT 2
- 关于百度api的建议
- 关于百度api的建议 HOT 2
- 引用的包没有 HOT 2
- exhentai文档是不是有问题 HOT 5
- 百度识图的结果和在网页上返回的结果不一致
- Ascii2D demo运行报错 HOT 31
- 小白请教这个怎么用? HOT 2
- Class google not work HOT 14
- Ascii2d 触发 Cloudflare HOT 3
- BaiDu搜图报`KeyError: 'simi'` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picimagesearch.