How can I get text between <span> </span> using python splinter lib

I want to get text between I already used lib splinter

"<span id="stWelcomeInbox" class="nui-txt-impt">
1
</span>"

PS: I don’t want to load the page and read as html-code maybe re lib is available, but I don’t know how to use it without loading this page. I also don't know how to use re lib. Please help me

+4
source share
1 answer

Use the find_by_id()method:

element = browser.find_by_id('stWelcomeInbox').first
print element.text
+6
source

Source: https://habr.com/ru/post/1542265/


All Articles