feat: 添加自定义回复插件 URL 内容获取功能#72
Open
xingzhiyou wants to merge 4 commits into
Open
Conversation
- 更新README.md,添加功能特性说明(关键词匹配、变量替换等)
- 重写README_USE.md,详细说明插件使用方法和使用示例
- 新增{url:链接}变量支持,可智能识别并发送图片或文本内容
- 添加图片格式检测(PNG/JPG/GIF/WebP)
- 实现URL内容缓存机制,提升响应速度
- 支持异步获取远程图片并保存到本地临时文件
- 修改_is_image_by_content函数返回类型,增加文件扩展名返回 - 新增BMP格式的magic bytes检测支持 - 简化缓存访问逻辑,使用ssl=False支持自签名证书 - 优化图片处理流程,先保存内容再检测类型 - 添加错误日志输出替代静默失败
- 引入time模块追踪缓存时间戳 - 扩展缓存数据结构,添加时间戳字段 - 新增_get_cached函数实现缓存过期检查和自动清理 - 修改fetch_url_content使用新的缓存获取函数 - 过期缓存自动删除对应的临时文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动说明
使用示例
测试情况