select_one and select
See original GitHub issueI like the function soup.select()
and soup.select_one()
. Maybe you can add select_one
to this repo? If the result is None, I can easily know that there are no match objects. Just like https://docs.python.org/3/library/re.html#re.search Infact, I don’t know why you use limit
to control the number of the results. I think people would need one or all of the results.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
SelectOne | Professional Recruiting & Staffing Firm
Smarter recruiting knows the difference between filling and fitting. We put people and technology to work together to help your organization grow.
Read more >Selectone select paint and primer all in one - Exclusive Paints
A low voc interior/exterior all in one paint and primer, offering excellent durability and adhesion. 100% acrylic formula. Select 100% Acrylic is suitable...
Read more >SelectOne Network
dba Select Marketing Services, Inc. P.O. Box 16267. Savannah, GA 31416. Serving the Southeastern United States. (912) 667-0441 (800) 662-6992
Read more >SelectONE | ShawContract
SelectONE is a quick ship collection that combines our design and segment expertise to solve your needs for high-performing, budget-driven choices.
Read more >selectOne - Select One - IBM
Specifies whether to limit selection to one item. Category. basics. Syntax. selectOne="true|false". Usage. In Design mode, click All Properties and look for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had a little time this morning, so I implemented the feature via #46. It will be in the
1.5.0
release. Not sure when that release is coming yet. Maybe not too far out. I imagine major releases will slow down moving forward as I feel the project has a solid feature base now, but I think I’ll at least get this one out within the week.Well, I didn’t ivent it, it was something other libraries have been using for a while. I know JQuery and the lxml CSSSelect library implement it. It seemed too logical and convenient not to add here as well.
Yeah, that was kind of my model when I wrote it. Seemed like if you had a script with known things you were looking for, instead of calling
select
over and over, and reparsing the selector string and building the search object, it would be best to:Allow you to build that thing once and reuse it.
Cache them in case you didn’t think to precompile it to begin with.
Both of these the
re
module employs.