A picsearch plugin for nonebot2
Project description
nonebot_plugin_picsearcher
- 基于nonebot2
功能
- 从各个接口查找色图来源
开始使用
建议必须使用 pip
- 通过 pip 从 PyPI 安装
pip install nonebot-plugin-picsearcher
- 在 nonebot2 项目中设置 load_plugin()
nonebot.load_plugin('nonebot_plugin_picsearcher')
- 参照下文在 nonebot2 项目的环境文件 .env.* 中添加配置项
配置项
由于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
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70bf7a3ad5fa12e08a9ced53e75e5d8b66c147d45d318178e7c02e7d272471f9 |
|
MD5 | 9e79216b855f788eeef2cb1446e627f2 |
|
BLAKE2b-256 | 2e06fc783ca32e0dcd2f1e858f48a02731dda366ed8c7c04ea9579ad8352fec6 |
Close
Hashes for nonebot_plugin_picsearcher-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4827c802a0a990678c10f32026b10415c2454219d839c6c9f2501eea0bdde43b |
|
MD5 | 5a29dd16fce6c632c529e104daffd98c |
|
BLAKE2b-256 | 595f6c3b3491d9e5dcaf226afee3b2bad89e434469d0f88bb5bc65cee3841e4f |