Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Baixa dados de COVID do Ministério da Saúde
from selenium import webdriver
from selenium.webdriver.firefox.options import Options as FirefoxOptions
options = FirefoxOptions()
options.headless = True
# To prevent download dialog on firefox
profile = webdriver.FirefoxProfile()
profile.set_preference('browser.download.manager.showWhenStarting', False)
profile.set_preference('browser.helperApps.neverAsk.saveToDisk',
'application/x-rar-compressed, application/octet-stream, application/zip, application/octet-stream, application/x-zip-compressed, multipart/x-zip')
browser = webdriver.Firefox(profile, options=options)
browser.get("https://covid.saude.gov.br/")
browser.find_element_by_xpath("//ion-button[contains(text(),'Arquivo')]").click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment