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

How to find an element with particular value? #21

Open
andreygursky opened this issue Jun 2, 2018 · 2 comments
Open

How to find an element with particular value? #21

andreygursky opened this issue Jun 2, 2018 · 2 comments

Comments

@andreygursky
Copy link

Hi!

I have html files not using ids. With beautifulsoup it is easy to find such element using find("Some text"):

<span style="color: #012345">Some text</span>

Is the only way to find this to use FindAll("span") and then iterating through all found spans? In this case, how can I check whether a particular span element contains text? I wouldn't like to disable debugging, since, I guess, empty span is not necessary a critical error.

@anaskhan96
Copy link
Owner

Hi, this isn't supported currently (could be included in future versions)
Iterating through all spans and calling the method Text() on them would be an alternative option atm.

@Swathi-L
Copy link

Swathi-L commented Apr 6, 2022

Hi @anaskhan96
If no one is working on this enhancement and it's still open, can I take it up?
Could you assign it to me?

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

No branches or pull requests

3 participants