Answer the question
In order to leave comments, you need to log in
How to display the content of the title attribute in a css selector?
I am writing a parser in selenium and I need to display the contents of the title attribute
. Here is the code I am using
a = browser.find_element_by_css_selector('ul > li > a > span')
print(a)
<span class="g47SY " title="21 110">21,1тыс.</span>
print(a.text)
Answer the question
In order to leave comments, you need to log in
What those need is not clear, but the text title
is in any case, like any other attribute, purely by definition.
As for the question itself, I can think of only two options:
span[title="21 093"]:after {
content: attr(title)
}
but then what does python have to do with it? ..
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question