Questions tagged [csquery]

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4+

CsQuery is a jQuery port for .NET 4. It implements all CSS2 & CSS3 selectors, all the DOM manipulation methods of jQuery, and some of the utility methods. The majority of the jQuery test suite (as of 1.6.2) has been ported to C#. Here is its official github.

69 questions
0
votes
1 answer

can you find html element by attribute with csquery

Can I use csquery to find a html with a certain attribute with a certain value. So if I got a page where there is something like this
something
Can I then get the hole line out by…
DaCh
  • 921
  • 1
  • 14
  • 48
0
votes
0 answers

Trouble crawling html when it is not consistent

I am new to csquery and I am having trouble crawling html like this below:
  • 1 pound sweet Italian Sausage
  • wingerse
    • 3,670
    • 1
    • 29
    • 61
    0
    votes
    2 answers

    How to change all imageTag src path in CsQuery

    How can I change all images "src" in a html string in CSQuery? Here is my code: CQ HtmlContainingImg = html; CQ imgTagList = HtmlContainingImg["IMG"]; foreach (var img in imgTagList) { string imgsrc = img.Attributes["src"]; if…
    skhurams
    • 2,133
    • 7
    • 45
    • 82
    0
    votes
    2 answers

    CsQuery pseudoselector exception

    I started to have some exceptions where using the pseudoselector :first. This started to happen when I changed my target framework from 4 to 4.5.1 on visual studio. The same code was run before without any errors. Everything else with CsQuery seems…
    VMh
    • 1,300
    • 1
    • 13
    • 19
    0
    votes
    2 answers

    Scrape JavaScript array data with CsQuery

    Some of the data I want to scrape is contained inside the pages JavaScript. It looks similar to this pattern: