Available on crate features
scraper and reqwest only.Expand description
基于 reqwest 的网络获取模块
提供一站式从网页或头部 JSON 源拉取并解析 BMS 难度表的能力:
- 获取网页并从 HTML 提取 bmstable 头部地址(如有);
- 下载并解析头部 JSON;
- 根据头部中的
data_url下载谱面数据并解析; - 返回包含表头与谱面集合的
BmsTable。
§示例
use bms_table::fetch::reqwest::fetch_table;
let table = fetch_table("https://stellabms.xyz/sl/table.html").await?;
assert!(!table.data.charts.is_empty());Functions§
- fetch_
table - 从网页或头部 JSON 源拉取并解析完整的 BMS 难度表。
- fetch_
table_ full - 从网页或头部 JSON 源拉取并解析完整的 BMS 难度表。
- fetch_
table_ index - 获取 BMS 表索引列表。
- fetch_
table_ index_ full - 获取 BMS 表索引列表及其原始 JSON 字符串。