pub async fn fetch_bms_table(web_url: &str) -> Result<BmsTable>Expand description
从URL直接获取BmsTable对象
§参数
url- BMS表格HTML页面的URL
§返回值
返回解析后的BmsTable对象
§错误
如果无法获取数据或解析失败,将返回错误
§示例
use bms_table::fetch_bms_table;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let bms_table = fetch_bms_table("https://example.com/table.html").await?;
println!("表格名称: {}", bms_table.name);
println!("谱面数据数量: {}", bms_table.charts.len());
Ok(())
}