From 1a78d57326ab882f49bb95758cf62abefdffe9af Mon Sep 17 00:00:00 2001 From: VINAGHOST Date: Mon, 8 Dec 2025 00:30:34 +0700 Subject: [PATCH] Update inventory page parsing logic Refactor the `IsInventoryPage` method in `InventoryParser.cs` to change the logic for selecting `` nodes within the `heroDiv` element. Replaced the `GetAttributeValue` check for `data-tab` with a `HasClass` check for the `tabItem` class. This improves the clarity and maintainability of the node selection logic. --- MainCore/Parsers/InventoryParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainCore/Parsers/InventoryParser.cs b/MainCore/Parsers/InventoryParser.cs index 9735386b..c07053a3 100644 --- a/MainCore/Parsers/InventoryParser.cs +++ b/MainCore/Parsers/InventoryParser.cs @@ -7,7 +7,7 @@ public static bool IsInventoryPage(HtmlDocument doc) var heroDiv = doc.GetElementbyId("heroV2"); if (heroDiv is null) return false; var aNode = heroDiv.Descendants("a") - .FirstOrDefault(x => x.GetAttributeValue("data-tab", 0) == 1); + .FirstOrDefault(x => x.HasClass("tabItem")); if (aNode is null) return false; return aNode.HasClass("active"); }