SkillAgentSearch skills...

YetAnotherPicSearch

Yet another picture search plugin for nonebot2

Install / Use

/learn @lgc-NB2Dev/YetAnotherPicSearch
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!-- markdownlint-disable MD031 MD033 MD036 MD041 MD045 --> <div align="center"> <a href="https://v2.nonebot.dev/store"> <img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"> </a> <p> <img src="https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/plugin.svg" alt="NoneBotPluginText"> </p>

YetAnotherPicSearch

✨ 基于 NoneBot2PicImageSearch 的另一个 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_KEYWORDSEARCH_IMMEDIATELY) | | SEARCH_IN_GROUP_ONLY_KEYWORD | 否 | True | 是否在群聊中只响应指令消息,否则可以通过 @Bot 触发搜图模式 | | SEARCH_IMMEDIATELY | 否 | True | 私聊发送图片是否直接触发搜图,否则需要使用命令 | | WAIT_FOR_IMAGE_TIMEOUT | 否 | 180 | 当用户未提供图片时,提示用户提供图片的等待时间(秒) | | 消息配置 | | |

Related Skills

View on GitHub
GitHub Stars141
CategoryDevelopment
Updated18d ago
Forks14

Languages

Python

Security Score

100/100

Audited on Mar 8, 2026

No findings