I'm trying to use web scraping to get the parking price at this link, https://application.parkbytext.com/accountus/prepay.htm?locationCode=1127. It's $2 for the day which is what I'm trying to get. I'm using python+selenium, but just couldn't get the parking price. Below is the code I'm using, but sometimes I hit the target but most time I get the error
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"class name","selector":"gwt-RadioButton"}.
Can anyone help? thanks in advance
def downtownparking(driver):
driver.get("https://application.parkbytext.com/accountus/prepay.htm?locationCode=1127")
try:
### driver.wait = WebDriverWait(driver, 16)
### driver.implicitly_wait(20)
cr = driver.find_element_by_class_name("gwt-RadioButton")
dayprice = cr.find_element_by_tag_name("label")
print (dayprice.text)