//rush is to skip the printing public void Get(HtmlDocument doc, bool rush = false) { GetFilter(doc); List <string> printout = new List <string>(new string[] { Etc.MakeUnderline("Today's Matches") + "\n" }); HtmlNodeCollection matchBoxNodes = doc.DocumentNode.SelectNodes("//a[contains(@class, \"hotmatch-box\")]"); HandleMatches(matchBoxNodes, printout, rush: rush); }
public static void Show(HtmlNode docNode) { Color holder = Console.ForegroundColor; Console.ForegroundColor = Color.GreenYellow; Console.WriteLine(Etc.MakeUnderline("\nHead to Head\n\nAll Time Stats:")); HtmlNode allTimeCount = docNode.SelectSingleNode("//div[@class=\"head-to-head\"]"); PrintAllTime(allTimeCount); HtmlNode hthListing = docNode.SelectSingleNode("//div[contains(@class, 'head-to-head-listing')]"); PrintAdv(hthListing); Console.ForegroundColor = holder; }
public static void Show(HtmlNode docNode) { HtmlNode mapGrid = docNode.SelectSingleNode("//div[contains(@class, 'g-grid')]"); HtmlNode mapCol = mapGrid.SelectNodes("./div")[0]; HtmlNodeCollection info = mapCol.SelectNodes(".//*[contains(@class, 'padding')]"); Console.WriteLine("\n" + info[0].InnerText + "\n"); if (info.Count > 1) { HtmlNodeCollection vetoes = info[1].SelectNodes("./div"); foreach (HtmlNode veto in vetoes) { Console.WriteLine(veto.InnerText); } Console.Write("\n"); } HtmlNodeCollection maps = mapCol.SelectNodes(".//div[@class=\"mapholder\"]"); foreach (HtmlNode map in maps) { string mapName = map.SelectSingleNode(".//div[@class=\"mapname\"]").InnerText; HtmlNode played = map.SelectSingleNode("./div[@class=\"played\"]"); //map wasn't played/ended before map could be played if (played == null) { Console.Write(mapName + "("); Console.Write("Map unplayed", Etc.LOST); Console.Write(")\n"); break; } Console.WriteLine(Etc.MakeUnderline(mapName)); HtmlNode results = map.SelectSingleNode(".//div[contains(@class, 'results')]"); if (results != null) { GetTeamScore(results); } } }