Available on crate features
scraper and reqwest only.Expand description
Network fetching module based on reqwest
Provides an all-in-one ability to fetch and parse BMS difficulty tables from a web page or a header JSON source:
- Fetch the page and extract the bmstable header URL from HTML (if present);
- Download and parse the header JSON;
- Download and parse chart data according to
data_urlin the header; - Return a parsed
BmsTableplus the raw JSON strings used for parsing.
§Example
use bms_table::fetch::reqwest::Fetcher;
let fetcher = Fetcher::lenient()?;
let table = fetcher.fetch_table("https://stellabms.xyz/sl/table.html").await?.table;
assert!(!table.data.charts.is_empty());Structs§
- Fetcher
- Fetcher wrapper around a reusable
reqwest::Client.