public static void L2Categories() { string L1CategoriesPath = @"D:\265.com\L1\1.txt"; StreamReader sr = new StreamReader(L1CategoriesPath); string L2CategoriesDir = @"D:\265.com\L2\"; string category = "", url = "", tmp = ""; int count = 0; while ((tmp = sr.ReadLine()) != null) { if (tmp != "" && tmp != "\n") { Console.WriteLine(++count); string[] line = tmp.Split('\t'); category = line[0]; url = line[1]; string L2CategoryPath = L2CategoriesDir + category + ".txt"; string html = DownloadHtml.DownloadHtmlstring(url); List <HtmlNode> nodes = markupParser.Parse(html); Subpath(html, nodes, L2CategoryPath); } } sr.Close(); }
public static void testNodes() { string navigation_site_url = @"http://www.265.com/"; string html = DownloadHtml.DownloadHtmlstring(navigation_site_url); List <HtmlNode> nodes = markupParser.Parse(html); //RootLeftpath(html, nodes); //RootRightpath(html, nodes); L2Categories(); }