C#C
C#4y ago
Legion

❔ Getting Info From HTML File

Hi guys i have a simple ish question.
so i have this Steam Collection file link:
https://steamcommunity.com/sharedfiles/filedetails/?id=2892539040
From here i can see HTML via view Source.
And that is all fine i got that hole HTML file saved in a single string like this Code:
  Console.WriteLine("Please input the steam collection page:");
            string url = Console.ReadLine();
            if (IsSteamPage(url))
            {
                using (WebClient client = new WebClient())
                {
                    string content = client.DownloadString(url);
                }
            }
            else
            {
                Console.WriteLine("Its not Steam Page.");
            }
            Console.ReadLine();

As you can see hole HTML file is saved in a single string called content. That is all Fine but from there i need to extract info like this:
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2732407704"><div class="workshopItemTitle">[Reworked] Madax Weapon Pack</div></a>

there are lines like this one above and i would like to get all the Mods names and steam links as well as their id in this example the id is 2732407704.
I know its a simple string manipulation but i am stuck and if anybody know how i can solve this pls do tell and ty very mutch for helping in advance.
Steam Workshop: Project Zomboid.
Was this page helpful?