Skraper supports hybrid CSS and XPath selectors, meaning that you can use CSS, XPath, or CSS selectors with XPath expressions in them. It also supports Sizzle and Slick selectors.

CSS Helpers

These CSS helper selectors are provided to simplify complex CSS expressions and to add jQuery-like functionality. Unlike normal pseudo-classes, these selectors can be chained any number of times in any order.

:first

Select first element (shortcut for :first-of-type)

:first(n), :limit(n)

Select first n elements

:last

Select last element (shortcut for :last-of-type)

:last(n)

Select last n elements

:skip(n), skip-first(n)

Skip first n elements

:skip-last(n)

Skip last n elements

:range(n1, n2)

Select n1 through n2 elements inclusive

:even

Select even elements

:odd

Select odd elements

:checked

Select nodes with checked or selected attributes

:has(selector)

Select elements that have at least one selector child

:before(selector)

Select elements that appear before selector

:before-sibling(selector)

Select siblings that appear before selector

:contains(string), :icontains(string)

Select elements whose contents contain string

:starts-with(string), :istarts-with(string)

Select elements whose contents start with string

:ends-with(string), :iends-with(string)

Select elements whose contents end with string

:internal, :external

Select nodes with internal or external hrefs or src

:http, :https, :javascript

Select nodes with a certain protocol

:domain(string)

Select nodes with a certain domai

:path(string)

Select nodes that start with a certain path

:html

Get element innerHTML

:source

Get element outerHTML

/comment()

Select comments

.exampleSelector[n]

Select nth element (shortcut for :nth-of-type)

@attribute

Select attribute