feat(steam-info): 资料页状态/最近游玩/ban 描述增强,时长图渲染与定时任务迁移
- steam.py / draw.py / handlers 扩充:个人资料页状态构建、最近游玩、 游戏头像与中文游戏名查询、ban 描述 - 定时播报迁入 hexi.core.scheduler - 新增 tests/test_steam_profile_parse.py(资料 HTML/XML 解析) Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
0ac1958932
commit
6af60a7d55
6 files changed
+1298
-125
No files matched your search
@@ -16,7 +16,7 @@ require("nonebot_plugin_localstore")
|
||||
require("nonebot_plugin_apscheduler")
|
||||
from nonebot_plugin_alconna.uniseg import get_target as uni_get_target
|
||||
import nonebot_plugin_localstore as store
|
||||
from nonebot_plugin_apscheduler import scheduler
|
||||
from hexi.core.scheduler import scheduled_job
|
||||
from nonebot_plugin_alconna import Text, Image, UniMessage, Target
|
||||
from nonebot.adapters.onebot.v11 import Bot
|
||||
from .config import Config
|
||||
@@ -29,13 +29,18 @@ from .steam import (
|
||||
get_steam_users_info,
|
||||
init_api_key_manager,
|
||||
get_play_time as fetch_play_time,
|
||||
get_recently_played,
|
||||
fetch_game_header_image,
|
||||
get_game_cn_names,
|
||||
localize_game_name,
|
||||
migrate_game_names_json,
|
||||
update_steamdb_apps,
|
||||
build_profile_status,
|
||||
describe_ban,
|
||||
_is_full_sync_done,
|
||||
_query_game_names,
|
||||
_query_game_icon_hashes,
|
||||
_query_game_name_ch_by_en,
|
||||
_upsert_game_names,
|
||||
_upsert_game_icon_hashes,
|
||||
)
|
||||
@@ -464,7 +469,7 @@ async def update_steam_info():
|
||||
_broadcast_lock = asyncio.Lock()
|
||||
|
||||
|
||||
@scheduler.scheduled_job(
|
||||
@scheduled_job(
|
||||
"interval", minutes=config.steam_request_interval / 60, id="update_steam_info"
|
||||
)
|
||||
async def fetch_and_broadcast_steam_info():
|
||||
|
||||
Reference in new issue
Block a user