YetAnotherPicSearch
Yet another picture search plugin for nonebot2
Install / Use
/learn @lgc-NB2Dev/YetAnotherPicSearchREADME
YetAnotherPicSearch
✨ 基于 NoneBot2 与 PicImageSearch 的另一个 NoneBot 搜图插件 ✨
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="python"> <a href="https://github.com/astral-sh/uv"> <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv"> </a> <br /> <a href="https://pydantic.dev"> <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/pyd-v1-or-v2.json" alt="Pydantic Version 1 Or 2" > </a> <a href="./LICENSE"> <img src="https://img.shields.io/github/license/lgc-NB2Dev/YetAnotherPicSearch.svg" alt="license"> </a> <a href="https://pypi.python.org/pypi/YetAnotherPicSearch"> <img src="https://img.shields.io/pypi/v/YetAnotherPicSearch.svg" alt="pypi"> </a> <a href="https://pypi.python.org/pypi/YetAnotherPicSearch"> <img src="https://img.shields.io/pypi/dm/YetAnotherPicSearch" alt="pypi download"> </a> <br /> <a href="https://registry.nonebot.dev/plugin/yetanotherpicsearch:YetAnotherPicSearch"> <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin%2FYetAnotherPicSearch" alt="NoneBot Registry"> </a> <a href="https://registry.nonebot.dev/plugin/yetanotherpicsearch:YetAnotherPicSearch"> <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin-adapters%2FYetAnotherPicSearch" alt="Supported Adapters"> </a> </div>📖 介绍
主要受到 cq-picsearcher-bot 的启发。我只需要基础的搜图功能,于是忍不住自己也写了一个,用来搜图、搜番、搜本子。
目前支持的搜图服务:
Ascii2D | Baidu | E-Hentai | ExHentai | Google | Iqdb | SauceNAO | TraceMoe | Yandex
💿 安装
以下提到的方法 任选其一 即可
<details open> <summary>[推荐] 使用 nb-cli 安装</summary> 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install YetAnotherPicSearch
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
pip install YetAnotherPicSearch
</details>
<details>
<summary>pdm</summary>
pdm add YetAnotherPicSearch
</details>
<details>
<summary>poetry</summary>
poetry add YetAnotherPicSearch
</details>
<details>
<summary>conda</summary>
conda install YetAnotherPicSearch
</details>
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入
[tool.nonebot]
plugins = [
# ...
"YetAnotherPicSearch"
]
</details>
⚙️ 配置
| 配置项 | 必填 | 默认值 | 说明 |
| :----------------------------: | :--------------------------: | :-------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| 通用配置 | | | |
| PROXY | 否 | None | 大部分请求所使用的代理地址,如需要 socks 协议支持请额外执行 pip install YetAnotherPicSearch[socks] 安装 |
| 数据源配置 | | | |
| SAUCENAO_API_KEY | $${\textsf{\color{red}是}}$$ | 无 | SauceNAO 的 API KEY,在 这里 注册后到 这里 获取<br />如果 SauceNAO 的 API 使用触发当日上限,请同时换新的 API Key 和代理节点,仅换其中一个没有意义。 |
| ASCII2D_BASE_URL | 否 | https://ascii2d.net | Ascii2D Base URL (#139) |
| HIDE_ASCII2D_BASE_URL | 否 | True | 当自定义 Ascii2D Base URL 后,是否将自定义的 URL 替换回官方 URL |
| EXHENTAI_COOKIES | 否 | None | ExHentai 的 Cookies,没有的情况下自动改用 E-Hentai 搜图,获取方式参考 请参考 PicImageSearch 文档 |
| NHENTAI_BASE_URL | 否 | https://ascii2d.net | NHentai Base URL (#139) |
| HIDE_NHENTAI_BASE_URL | 否 | True | 当自定义 NHentai Base URL 后,是否将自定义的 URL 替换回官方 URL |
| NHENTAI_USERAGENT | 否 | None | 用来绕过 NHentai Cloudflare 拦截的 User Agent,配置后在 E-Hentai 标题搜索无结果时会自动调用 NHentai 标题搜索<br />先用配置的 PROXY 做代理,使用浏览器访问 NHentai 通过 CloudFlare 检测后,获取 UA 和 Cookies 填到对应配置项 |
| NHENTAI_COOKIES | 否 | None | 用来绕过 NHentai Cloudflare 拦截的 Cookies,同上 |
| 行为配置 | | | |
| SAUCENAO_LOW_ACC | 否 | 60 | SauceNAO 相似度低于这个百分比将被认定为相似度过低 |
| AUTO_USE_ASCII2D | 否 | True | 是否在 SauceNAO 或 IQDB 相似度过低时 / E-Hentai 无结果时 自动使用 Ascii2D 搜索 |
| 交互配置 | | | |
| SEARCH_KEYWORD | 否 | 搜图 | 触发插件功能的指令名,使用时记得带上你配置的指令头 |
| SEARCH_KEYWORD_ONLY | 否 | False | 是否只响应指令消息(优先级高于 SEARCH_IN_GROUP_ONLY_KEYWORD 与 SEARCH_IMMEDIATELY) |
| SEARCH_IN_GROUP_ONLY_KEYWORD | 否 | True | 是否在群聊中只响应指令消息,否则可以通过 @Bot 触发搜图模式 |
| SEARCH_IMMEDIATELY | 否 | True | 私聊发送图片是否直接触发搜图,否则需要使用命令 |
| WAIT_FOR_IMAGE_TIMEOUT | 否 | 180 | 当用户未提供图片时,提示用户提供图片的等待时间(秒) |
| 消息配置 | | |
Related Skills
node-connect
337.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.3kCommit, push, and open a PR
