hickory icon indicating copy to clipboard operation
hickory copied to clipboard

Any interest in CSS-style selectors?

Open cap10morgan opened this issue 2 years ago • 3 comments

Great library, thanks for writing and publishing it!

I wrote up a macro for my own usage that allows me to use CSS-style selectors for simple scalar selectors (i.e. div.foo, span#bar, or even div.foo:nth-child(3) but not compound things like div tr td) that lets me do this:

(css-selector :td.comment)

instead of this:

(s/and (s/tag "td") (s/class "comment"))

Is there any interest in merging something like that into the project? I can put together a PR if so.

cap10morgan avatar Jan 19 '23 18:01 cap10morgan

Would be nice

port19x avatar Mar 21 '23 13:03 port19x

I would love that. CSS selectors seem a good lingua-franca for selecting through HTML

WorldsEndless avatar Mar 21 '23 15:03 WorldsEndless

This would also make common lisp webscraping code portable to clojure and vice versa. (the common lisp webscraping library uses css selectors)

port19x avatar Mar 22 '23 09:03 port19x