Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void LinkMod()
- {
- workingLink = MakeUseableLink.workingLink;
- if (workingLink.StartsWith(curseForgeMods))
- {
- // handles mods.curse.com links
- Console.WriteLine("this is a mods.curse.com link");
- var htmlDoc = web.Load(workingLink);
- //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
- //{
- // var hrefValue = node.Attributes["href"]?.Value;
- // downloadLink = workingLink + hrefValue;
- //}
- }
- else if (workingLink.StartsWith(curseProject))
- {
- // handles curseforge.com
- Console.WriteLine("this is a wow.curseforge.com link");
- var htmlDoc = web.Load(workingLink);
- //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
- //{
- // var hrefValue = node.Attributes["href"]?.Value;
- // downloadLink = workingLink + hrefValue;
- // }
- }
- else if (workingLink.StartsWith(curseForge))
- {
- // handles curseforge.com
- Console.WriteLine("this is a curseforge.com link");
- var htmlDoc = web.Load(workingLink);
- //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
- // {
- // var hrefValue = node.Attributes["href"]?.Value;
- // downloadLink = workingLink + hrefValue;
- //}
- }
- else if (workingLink.StartsWith(wowAce))
- {
- // handles WoWAce
- Console.WriteLine("this is a wowace.com link");
- var htmlDoc = web.Load(workingLink);
- //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
- //{
- // var hrefValue = node.Attributes["href"]?.Value;
- // downloadLink = workingLink + hrefValue;
- //}
- }
- else if (workingLink.StartsWith(wowInterface))
- {
- // handles WoWInterface
- Console.WriteLine("this is a wowinterface.com link");
- var htmlDoc = web.Load(workingLink);
- //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
- //{
- // var hrefValue = node.Attributes["href"]?.Value;
- // downloadLink = workingLink + hrefValue;
- //}
- }
- MakeUseableLink.DownloadStuffs();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment