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:
parent
0e1662e86e
commit
0e1ebccd9c
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue