This file contains hidden or 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 | |
| """Revisa sitios WordPress: que respondan y que su ultima nota tenga < 24 h. | |
| Uso: python3 wp_check.py sitios.txt (un sitio por linea, # = comentario) | |
| python3 wp_check.py https://a.com b.org | |
| Sale con codigo 1 si algun sitio falla (util para cron o CI).""" | |
| import json | |
| import sys | |
| import urllib.request | |
| from concurrent.futures import ThreadPoolExecutor | |
| from datetime import datetime, timedelta, timezone |
This file contains hidden or 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 sys | |
| from datetime import datetime, timezone, timedelta | |
| import requests | |
| SITES = [ | |
| "https://techcrunch.com", | |
| "https://wordpress.org/news", | |
| ] | |
| def check_wordpress_site(url): |