This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Trouble parsing html

description

I'm trying to parse the html page "http://projectfreetv.us/internet/big-brother-canada/season-1.html" with the CssSelect of ".episode a"

It only gives me the episode classes in the first table.
WebRequest request = WebRequest.Create("http://projectfreetv.us/internet/big-brother-canada/season-1.html");

HttpWebResponse resp = (HttpWebResponse)request.GetResponse();

StreamReader reader = new StreamReader(resp.GetResponseStream());

HtmlAgilityPack.HtmlDocument doc = new HtmlDocument();

doc.LoadHtml(reader.ReadToEnd());

foreach(HtmlNode node in doc.DocumentNode.CssSelect(".episode a"))
{
          Console.WriteLine(node.InnerText);
 }

comments