I'm making a stock checker and I have a bit of a problem when I go to Amazon (AMZN) in finance.yahoo.com. My code works perfectly, but when I try for example Tesla (TSLA) it doesn't work. Here is part of my code.
getperstock = driver.find_element_by_xpath('//*[@class="Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)"]').text #Works
print(str(getperstock))
#"Trsdu(0.3s) Fw(500) Pstart(10px) Fz(24px) C($negativeColor)"
getstockratio = driver.find_element_by_xpath('//*[@class="Trsdu(0.3s) Fw(500) Pstart(10px) Fz(24px) C($positiveColor)"]').text #Doesnt
print(str(getstockratio))