1
Fork 0
mirror of https://github.com/redstrate/Auracite.git synced 2025-05-01 08:27:46 +00:00

Don't panic when parsing certain item names

This commit is contained in:
Joshua Goins 2025-04-28 16:36:24 -04:00
parent 0e1662e86e
commit 0e1ebccd9c

View file

@ -224,11 +224,11 @@ fn parse_item_tooltip(element: &scraper::ElementRef<'_>) -> Option<ItemValue> {
.select(&Selector::parse(".db-tooltip__item__name").unwrap()) .select(&Selector::parse(".db-tooltip__item__name").unwrap())
.nth(0) .nth(0)
{ {
let text: String = slot.text().collect(); let mut text: String = slot.text().collect();
let item_name = text.strip_suffix("\u{e03c}").unwrap(); if text.contains("\u{e03c}") {
return Some(ItemValue { text = text.strip_suffix("\u{e03c}").unwrap().to_string();
name: item_name.to_string(), }
}); return Some(ItemValue { name: text });
} }
None None