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

find an element with an attribute regardless of value #72

Open
emayssat opened this issue Apr 17, 2023 · 0 comments
Open

find an element with an attribute regardless of value #72

emayssat opened this issue Apr 17, 2023 · 0 comments

Comments

@emayssat
Copy link

Is your feature request related to a problem? Please describe.

I have 'div' element with class='' and other div elements at the same level with class='whatever'
I cannot find a way to say get all the element with the attribute class

Describe the solution you'd like

soup.find('div', attrs={'class':''}, partial=True, mode='all')
should return a list with all the 'div' elements, but that is not the case

Describe alternatives you've considered

Tried to get the 'divs' in a 'div', but was not able to find a solution for that either.
Maybe solution is to do 2 find mode 'all' and concat the lists

Additional information

None

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

No branches or pull requests

1 participant