Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 C# jQuery
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
 
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
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 6-Dec-12 3:13am

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

  Print Answers RSS
0 Richard MacCutchan 269
1 Aajmot Sk 252
2 Marcin Kozub 235
3 Sergey Alexandrovich Kryukov 185
4 Praneet Nadkar 167
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100