Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using visual studio 2010 i am using httpwebrequest and httpwebresponse to get page source and for crawling the webpage i am using htmlagilitypack
I want to using :eq selector to reterive data from page source i have found out this can be done using fizzlerEx

http://fizzlerex.codeplex.com/[^]
Example give in the website

C#
using HtmlAgilityPack;
using Fizzler.Systems.HtmlAgilityPack;

var web = new HtmlWeb();
var document = web.Load("http://example.com/page.html")
var page = document.DocumentNode;

foreach(var item in page.QuerySelectorAll("div.item"))
{
    var title = item.QuerySelector("h3:not(.share)").InnerText;
    var date = DateTime.Parse(item.QuerySelector("span:eq(2)").InnerText);
    var description = item.QuerySelector("span:has(b)").InnerHtml;
}


and i am trying the same
C#
var page123 = doc.DocumentNode;
                foreach(var item in page123.QuerySelectorAll("body"))
                {                    
                    var date = item.QuerySelector("b:eq(10)");
                }


but i am getting error
"Unknown functional pseudo 'eq'. Only nth-child is supported."
please can any body help me with problem.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900