NoneBot2 插件:App Store 畅销榜查询
Project description
nonebot-plugin-appstore-gameranking
一个 NoneBot2 插件,实时查询 App Store 畅销榜,并输出指定游戏在榜单中的排名。
📦 插件介绍
- 插件名:
nonebot_plugin_appstore_gameranking - 功能:抓取 App Store 中国区畅销榜(Top Grossing),支持默认目标游戏排名、全榜输出、目标自定义、调试信息。
- 主要命令:
/appstore
⚙️ 功能与指令
/appstore(默认)
输出默认关注游戏的排名:
- 原神·空月之歌
- 崩坏:星穹铁道
- 鸣潮
- 明日方舟:终末地
- 绝区零
- 明日方舟
/appstore 帮助
/appstore 帮助
输出命令用法说明。
/appstore debug
/appstore debug
输出抓取的原始榜单前10条与筛选结果,用于调试。
/appstore 全榜
/appstore 全榜 20
输出前 N 名畅销榜(N 最大 200,默认 100)。
/appstore 目标 <游戏1,游戏2,...>
/appstore 目标 原神,崩坏:星穹铁道
输出指定目标游戏的排名(若未上榜则显示“未上榜(前100名内)”)。
🧩 安装
在 NoneBot 项目根目录使用 NB-CLI 安装(推荐):
nb plugin install nonebot-plugin-appstore-gameranking
也可以使用 pip 安装:
pip install nonebot-plugin-appstore-gameranking
在 pyproject.toml 的 [tool.nonebot] 部分加入:
plugins = ["nonebot_plugin_appstore_gameranking"]
🧪 本地测试
在开发项目里直接运行 NoneBot,插件会自动注册 /appstore 命令。
🧠 源码结构
nonebot_plugin_appstore_gameranking/__init__.py:插件元信息nonebot_plugin_appstore_gameranking/data.py:App Store 爬取与筛选辅助函数nonebot_plugin_appstore_gameranking/handlers.py:指令解析与结果格式化appstore_scraper_demo.py:demo 演示脚本
📌 注意
- 插件依赖网络请求 https://itunes.apple.com,请确保机器能访问该接口。
- 由于苹果的限制,单次抓取默认最多100条榜单
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_appstore_gameranking-0.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_appstore_gameranking-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04049c8f42f2cd1c2c6545babfb9a67486d9b7915517a11c059dc9d8b77f559e
|
|
| MD5 |
a04eaa1d444bb83ef81926f6cb4f80ca
|
|
| BLAKE2b-256 |
295aecd67b5dc1c55a2fdfe8295f092a71550e6d03a9aa6a25cd86e826049e6e
|
File details
Details for the file nonebot_plugin_appstore_gameranking-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_appstore_gameranking-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9af2e29abb8dbfa1a8026e8a3670453f73451800a22e3addbdf3982a75009c33
|
|
| MD5 |
6842c81211a3a4d66c33eb9a21bcd987
|
|
| BLAKE2b-256 |
5b9dfcc517ec5004817f21cf5a877359b1750dd8039b62d690401afdd823847b
|