Estoy haciendo un trabajo de web scraping de la siguiente pagina: Covid en chihuahua, lo que necesito hacer es generar un csv de la tabla que aparece en la pagina pero esta cargado con datos dinamicamente por lo cual estoy usando selenium. El problema es que aun asi no logro encontrar las tablas con el codigo el cual es el siguiente:
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
#url of the page we want to scrape
url = "https://saluddigital.ssch.gob.mx/covid/"
# initiating the webdriver. Parameter includes the path of the webdriver.
driver = webdriver.Firefox()
driver.get(url)
# this is just to ensure that the page is loaded
html = driver.page_source
soup = BeautifulSoup(html, "html.parser")
print(len(soup.find_all("table")))
driver.close()
driver.quit()
Cuando imprimo la tabla me sale 0 puesto que no la encuentra.
browser
que nunca ha sido definido, aunque supongo que en realidad serádriver