I'm currently working in this website: https://lawebdelaprimitiva.com/Primitiva/Historico%20de%20sorteos/1986.html Tring to obtain the values of the balls, so far i can only get the 7 first values using the for loop that i attach down below, but seems like reached that eigth member to be extracted, is like they dont have any text in their structure.
web='https://lawebdelaprimitiva.com/Primitiva/Historico%20de%20sorteos.html'
driver=webdriver.Chrome(path)
driver.get(web)
lispes=driver.find_element("id","anio")
opciones = lispes.find_elements(By.TAG_NAME, "option")
opciones[-2].click()
for bola in range(20):
print("--------")
name='id_sorteo' + str(bola)
print(name)
linea=driver.find_element(By.ID, name).text
print(linea)
driver.close()
I also tried to get the value by not using the ID but the title, getting same results.On the 7 firsts members, it does work, but on the 8th and so on, it doesn't:
linea2=driver.find_element(By.XPATH, '//*[@title="Jueves 30 de Octubre de 1986"]').text
print(linea2)
Any idea? Thank you