Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any interest in CSS-style selectors? #76

Open
cap10morgan opened this issue Jan 19, 2023 · 3 comments
Open

Any interest in CSS-style selectors? #76

cap10morgan opened this issue Jan 19, 2023 · 3 comments
Labels
category: ergonomics Quality of Life improvements type: feature request Feature requests

Comments

@cap10morgan
Copy link

cap10morgan commented Jan 19, 2023

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.

@port19x
Copy link
Contributor

port19x commented Mar 21, 2023

Would be nice

@WorldsEndless
Copy link

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

@port19x
Copy link
Contributor

port19x commented Mar 22, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: ergonomics Quality of Life improvements type: feature request Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants