duzun / hQuery.php

An extremely fast web scraper that parses megabytes of invalid HTML in a blink of an eye. PHP5.3+, no dependencies.
https://duzun.me/playground/hquery
MIT License
361 stars 74 forks source link

:nth-child support #51

Closed dbeja closed 5 years ago

dbeja commented 5 years ago

Hi,

I tried to use :nth-child but it seems to not be working.

The rule I'm using is this one: .product > .row > .col-12 > .row:nth-child(2)

Thanks

duzun commented 5 years ago

The :nth-child is in my ToDo list. At the moment you can use :eq(2) for your use-case:

.product > .row > .col-12 > .row:eq(2)

dbeja commented 5 years ago

Perfect, thanks, :eq works fine for what I need.