ericchiang / pup

Parsing HTML at the command line
MIT License
8.1k stars 257 forks source link

Can I use + ~ > in my selectors? #163

Open amigaosz opened 3 years ago

amigaosz commented 3 years ago

I'm not sure if I just haven't seen the documentation or issue post about the topic I'm writing about or if it is not implemented (yet). Is there any possibility to select items with the + ~ and > options like described here: https://www.w3schools.com/cssref/css_selectors.asp ?

I'm trying this but it seems not to work, my output is empty:

table tr:nth-child(1) td:nth-child(2) h2:nth-child(2) + p text{}

gromgit commented 3 years ago

What's the HTML source you're operating on?

mazznoer commented 2 years ago

~ operator is not implemented.