A picsearch plugin for nonebot2
Reason this release was yanked:
bugs while using exhentai search
Project description
nonebot_plugin_picsearcher
- 基于nonebot2
功能
- 从各个接口查找色图来源,目前支持ascii2d exhentai iqdb saucenao trace.moe
开始使用
建议必须使用 pip
- 通过 pip 从 PyPI 安装
pip install nonebot-plugin-picsearcher
- 在 nonebot2 项目中设置 load_plugin()
nonebot.load_plugin('nonebot_plugin_picsearcher')
- 参照下文在 nonebot2 项目的环境文件 .env.* 中添加配置项
- 使用时at搜图即可
配置项
由于exhentai的接口需要cookie,因此需要在配置文件 中加入如下选项
EX_COOKIE=XXXXX
特别注意
- 由于aiohttp的某些神奇实现,默认的FormData类需要被稍微调教一下
# 在\site-packages\aiohttp\formdata.py
class FormData:
"""Helper class for multipart/form-data and
application/x-www-form-urlencoded body generation."""
def __init__(self, fields:
Iterable[Any]=(),
quote_fields: bool=True,
charset: Optional[str]=None,
boundary: Optional[str]=None) -> None:
self._writer = multipart.MultipartWriter('form-data', boundary=boundary)
self._fields = [] # type: List[Any]
self._is_multipart = False
self._quote_fields = quote_fields
self._charset = charset
- 以上,给他加一个参数(该操作不会影响其他包
纯粹是 aiolibs 的人懒)
不魔改aiohttp会怎样?
那得问问那些网站愿不愿意了()
特别感谢
优化建议
可以来抓更多网站的接口or汇报bug or pr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot-plugin-picsearcher-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7a2a6bff5e965faac20c38849be2bce0b639df72b288b01c157f9261e04a600 |
|
MD5 | b1f3f82dfe99229b9698e9a4ba7fa02f |
|
BLAKE2b-256 | 2ecc11d025a291099b551da30e474b4855d9af6ee99da020fb117c59efcfa653 |
Close
Hashes for nonebot_plugin_picsearcher-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44d9bb51a6a57ac8f1db8fa7fcc7a49d2a2331855071ab4b043edafe4414416 |
|
MD5 | bc8ae02f35693701a21f89a57bf8cf64 |
|
BLAKE2b-256 | c097fdecce0dfc20bebcf2c91968ce72f1179e7f415d131a012775acaf92264c |