Skip to main content

从森空岛社区获取明日方舟COS图并随机发送

Project description

nonebot-plugin-skland-cos

从森空岛社区获取明日方舟 COS 图并随机发送的 NoneBot2 插件。

安装

nonebot_plugin_skland_cos 目录复制到你的 NoneBot2 项目的插件目录下,或在 pyproject.toml 中添加:

plugins = ["nonebot_plugin_skland_cos"]

依赖: httpx>=0.24.0

pip install httpx

使用

指令 说明
/cos 随机发送一张明日方舟 COS 图
/cos 3 随机发送 3 张 (最多 9 张)
/skcos /cos
/方舟cos /cos
/森空岛cos /cos

API 说明

插件通过请求森空岛社区的 COS 板块帖子列表接口获取图片。

由于森空岛没有公开的社区帖子 API 文档,插件内置了多个候选 endpoint 并会依次尝试。如果全部失败,你需要自己抓包获取正确的 API 地址,然后修改 __init__.py 中的 API_ENDPOINTS 列表。

抓包方法

  1. 打开浏览器 DevTools (F12) → Network 面板
  2. 访问 https://www.skland.com/game/arknights?cateId=3
  3. 筛选 XHR/Fetch 请求
  4. 找到返回帖子列表 JSON 的请求
  5. 将该 URL 填入 API_ENDPOINTS

许可

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_skland_cos-0.1.6.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_skland_cos-0.1.6-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_skland_cos-0.1.6.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_skland_cos-0.1.6.tar.gz
Algorithm Hash digest
SHA256 86b4b651d2657aa14025deeada85d5b26735d89d3c8974f8fedda2cb7d8ce75f
MD5 550837af0dc4786be24ea023a341a683
BLAKE2b-256 6a3caaa0b86651f98f9a33fb8736d9a9cf2b2b4580d5e9ee6df581e57d0d17fb

See more details on using hashes here.

File details

Details for the file nonebot_plugin_skland_cos-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_skland_cos-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ef60df2c4f96f0889af5d1bb57c15832c5595eed9998d0359270ec1846c7fafb
MD5 e8c764c76915c0f8fd064dc6c8a18a1e
BLAKE2b-256 624de26be7e7c4cd7c130c004ec8a3524a265fae82f7449e80e8a053b627e2b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page