Hellzbellz123

why not getting called

Jun 1st, 2019
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. public static void LinkMod()
  2. {
  3. workingLink = MakeUseableLink.workingLink;
  4.  
  5. if (workingLink.StartsWith(curseForgeMods))
  6. {
  7. // handles mods.curse.com links
  8. Console.WriteLine("this is a mods.curse.com link");
  9. var htmlDoc = web.Load(workingLink);
  10. //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
  11. //{
  12. // var hrefValue = node.Attributes["href"]?.Value;
  13. // downloadLink = workingLink + hrefValue;
  14. //}
  15. }
  16. else if (workingLink.StartsWith(curseProject))
  17. {
  18. // handles curseforge.com
  19. Console.WriteLine("this is a wow.curseforge.com link");
  20. var htmlDoc = web.Load(workingLink);
  21. //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
  22. //{
  23. // var hrefValue = node.Attributes["href"]?.Value;
  24. // downloadLink = workingLink + hrefValue;
  25. // }
  26. }
  27. else if (workingLink.StartsWith(curseForge))
  28. {
  29. // handles curseforge.com
  30. Console.WriteLine("this is a curseforge.com link");
  31. var htmlDoc = web.Load(workingLink);
  32. //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
  33. // {
  34. // var hrefValue = node.Attributes["href"]?.Value;
  35. // downloadLink = workingLink + hrefValue;
  36. //}
  37. }
  38. else if (workingLink.StartsWith(wowAce))
  39. {
  40. // handles WoWAce
  41. Console.WriteLine("this is a wowace.com link");
  42. var htmlDoc = web.Load(workingLink);
  43. //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
  44. //{
  45. // var hrefValue = node.Attributes["href"]?.Value;
  46. // downloadLink = workingLink + hrefValue;
  47. //}
  48. }
  49. else if (workingLink.StartsWith(wowInterface))
  50. {
  51. // handles WoWInterface
  52. Console.WriteLine("this is a wowinterface.com link");
  53. var htmlDoc = web.Load(workingLink);
  54. //foreach (HtmlNode node in htmlDoc.DocumentNode.SelectNodes("//p/a"))
  55. //{
  56. // var hrefValue = node.Attributes["href"]?.Value;
  57. // downloadLink = workingLink + hrefValue;
  58. //}
  59. }
  60.  
  61. MakeUseableLink.DownloadStuffs();
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment