Closed Chariblaze closed 1 year ago
Thanks for the report!
This patch should fix the issue:
diff --git src/main.rs src/main.rs
index 1bd86d8..6c68e1a 100644
--- src/main.rs
+++ src/main.rs
@@ -899,7 +899,12 @@ async fn fetch_metadata(client: &reqwest::Client, locale: &Locale, args: &Args,
write!(file, "{}", data)?;
if matches!(endpoint, EndPoint::Rankings) {
- let parsed_xml: NodeEshopRankings = quick_xml::de::from_str(&data).unwrap();
+ let parsed_xml: NodeEshopRankings = match quick_xml::de::from_str(&data) {
+ Ok(parsed_xml) => parsed_xml,
+ // NOTE: 3DS eShop returns an error page for region CN
+ Err(err) => { println!(" Failed to parse rankings, skipping ({})", err); continue },
+ };
+
for ranking in parsed_xml.rankings.ranking {
let _: RankingDocument = handle_ranking_content(&client, &ranking.id, &locale).await?;
}
Thank you, the patch fixes the issue!
Patch included in latest version. Thanks for testing!
cargo run -- fetch-metadata --regions CN --omit-ninja-contents
http_log:
Chinese eShop doesn't have rankings it seems, URL gives an eShop error.
(checking, all 122 other regions do have rankings)