I am trying to get value 26.70 from this span tag:
<span class="Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)" data-reactid="31">26.70</span>
I tried this:
html_text2=requests.get('https://finance.yahoo.com/quote/WRD.PA?p=WRD.PA&.tsrc=fin-srch').text
soup2 = BeautifulSoup(html_text2,'lxml')
data = soup2.select_one('span.Fz(36px)').text.strip()
print(data)
but I am getting this error:
soupsieve.util.SelectorSyntaxError: Invalid character '(' position 7
line 1:
span.Fz(36px)
^
Fz\(36px\)