This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Consulta la cifra de infectados en el Ministerio de Sanidad | |
# y envía una notificación al SO si ha cambiado. | |
# Añadir al cron para que se ejecute cada 5 minutos. | |
# | |
# Dependencia: sudo apt-get install libnotify-bin | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import subprocess | |
from bs4 import BeautifulSoup | |
from PIL import Image | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.common.exceptions import TimeoutException | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By |