I am trying to read and take the href for the elements from this table, but I can't I try selenium and urllib library but neither work:
driver = webdriver.Chrome('C:/Users/Public/chromedriver')
driver.get(str(link))
driver.implicitly_wait(30)
time.sleep(10)
try:
element = WebDriverWait(driver, 50).until(
EC.presence_of_element_located((By.CLASS_NAME, "tabla_datos_linea"))
)
for a in driver.find_elements_by_partial_link_text('impacto'):
print(a.text)
finally:
driver.quit()
I exagerate in this code the conditions used to wait for the DOM to load with explicit and implicit wait, but still is not taking the table :(. The output of this code is:
Expediente de evaluación de impacto ambiental
but I want this:
Expediente de evaluación de impacto ambiental
Estudio de impacto ambiental Firmado con certificado digital acreditado
Does anyone knows if this table has some trick or something? I used selenium other times without problem. And that place is public so I don't think it has some blockers or something.
thanks before hand!
The inner table present inside an
iframe
and you need switch toiframe
first in order to access the elements.Console Output: