JustArchiNET / ArchiSteamFarm

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
Apache License 2.0
10.92k stars 1.04k forks source link

Evaluate possibility of rewriting our XPath queries to CSS selectors #3184

Open JustArchi opened 3 months ago

JustArchi commented 3 months ago

Checklist

Enhancement purpose

Aw sh*t, here we go again...

The history of ASF using XPath is dated back to 2015, when we've used HtmlAgilityPack for parsing HTML files.

It was a very good decision back then, and still is, but since then AngleSharp was released, which turned out to be much more versatile and performant solution. Together with AngleSharp.XPath, rewriting ASF from HAP to AngleSharp turned out much easier than expected.

Solution

As part of further ASF upgrades, we should evaluate whether it's possible to rewrite our XPaths used in ASF to native mechanism provided by AngleSharp, which is CSS selectors exclusively, so we can eventually deprecate usage of AngleSharp.XPath and eventually remove it from the ASF core entirely.

Why currently available solutions are not sufficient?

It's good as it is, however, XPath is community library that extends AngleSharp with features that are not maintained officially. Using native AngleSharp mechanisms will allow us to drop a dependency and improve compatibility with upstream.

Can you help us with this enhancement idea?

Yes, I can code the solution myself and send a pull request

Additional info

No response