mgdm / htmlq

Like jq, but for HTML.
MIT License
7.09k stars 111 forks source link

is it possible to pass two selectors? #31

Open ralyodio opened 2 years ago

ralyodio commented 2 years ago

I want an "either/or" match (ie; if both exists would return results, or one or the other)

htmlq 'link[type="application/rss+xml"]' --attribute href

and htmlq 'link[type="application/atom+xml"]' --attribute href

something like: htmlq '(link[type="application/rss+xml"]|link[type="application/atom+xml"]' --attribute href would be ideal.

septatrix commented 2 years ago

In CSS terms that would simply be a comma: curl --silent https://www.rust-lang.org/ | htmlq '#get-help, head'