Comments (4)
用py-ciohttp测试了一下
使用file url发送失败且报相同错误, 但是base64和https均成功, 可以请问下您的测试环境吗?
另外 Server returned HTTP response code: 403
指禁止访问, 是否网络环境出了问题?
from onebot-kotlin.
感谢您的测试与回复!
这边使用的是nonebot,据其文档,其底层同样使用py-ciohttp
,感觉与您的环境是类似的;代码附在下面:
@on_command('发送图片', only_to_me=False)
async def _(session: CommandSession):
msg = '[CQ:image,file=https://i.loli.net/2020/05/28/uKvIAWadFC3csPO.jpg]'
await session.send(msg)
使用wget
命令能够正常下载到这张图片;如果问题不能重现,我认为应该是自身环境的问题,这边会继续排查一下。
最后再次感谢您带来了如此优秀的项目!
from onebot-kotlin.
cqhttp-mirai
的配置文件setting.yaml
的第一行可加入配置debug
属性来log接受到的请求, 或许可以提供一些思路
debug: true
1234567890:
......
经测试Nonebot
亦可正常发送, 测试mirai
版本为1.0.1, mirai-console
版本为0.5.2, cqhttp-mirai
版本为0.1.2
from onebot-kotlin.
与您环境相同,目前还未能确定产生403
错误的原因。
注意到使用Python
的urllib
不能直接下载图片(同样产生403
错误),但是设置请求的Header
为任意值后就可以了。由此猜想可能是触发了相关服务的反爬虫机制,IP受到限制。小图片下载并使用Base64
编码后可以正常发送。
谢谢您的测试!
from onebot-kotlin.
Related Issues (20)
- 登录QQ提示滑块验证请更换协议,换watch提示当前版本过低,要更新到 最新版 HOT 3
- [BUG]协议不规范? HOT 2
- [Question]如何开启gocq的长文本强制分节
- [BUG]无法区分群会话和群临时会话(群私聊)
- [Question] 配置文件中是否支持多个postUrl
- [BUG]图片上传提示插件无法获取到媒体 HOT 1
- [Question]1年没更了...uwu
- [Question]在和OlivOS配合使用时,打印以下错误日志
- 识别回复类信息时出现了报错[Question]
- [BUG]使用mcl进行操作的,升级到最新版的2.0beta后,报错上报的HTTP无法解析【已解决】 HOT 1
- 发送图片报错
- 发送图片报错
- [BUG]
- [Question]Websocket连接出错, 这是咋回事哇
- [BUG]通过http方式调用发送图片报错
- [Question]反向Websocket始终无法连接
- [BUG]mirai更新到v2.12.0后,加载本插件会导致mirai-http插件无法工作 HOT 1
- [BUG]onebot-mirai-0.3.4-all.jar报错导致机器人部分功能失效 HOT 1
- [BUG] 与 mirai-api-http 不兼容
- [Question]最近qq登陆不上了 238 235报错 求办法 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 onebot-kotlin.