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

FR: selectFirst() and expectFirst() on org.jsoup.select.Elements #2256

Open
PrOF-kk opened this issue Jan 3, 2025 · 1 comment
Open

FR: selectFirst() and expectFirst() on org.jsoup.select.Elements #2256

PrOF-kk opened this issue Jan 3, 2025 · 1 comment
Labels

Comments

@PrOF-kk
Copy link

PrOF-kk commented Jan 3, 2025

It'd be useful to be able to use selectFirst() and expectFirst() on org.jsoup.select.Elements instances to mirror the methods in org.jsoup.nodes.Element.
As far as I understand this is because org.jsoup.select.Selector provides both select(String, Element) and select(String, Iterable<Element>) but only selectFirst(String, Element).

I could take a look at it myself, but people knowledgeable about jsoup internals would probably take much less time.

Bonus points if it's actually faster than select(...).first() 😉

Thanks for your work

@jhy jhy added the feature label Jan 4, 2025
@jhy
Copy link
Owner

jhy commented Jan 4, 2025

Thanks, sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants