Last active
October 20, 2025 13:38
-
-
Save cmj/1d8bb93ff2b21dda999cd288a3ab07f5 to your computer and use it in GitHub Desktop.
Simple downdetector top outages with cloudscraper (anti-clownflare)
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/python3 | |
| import requests | |
| import cloudscraper | |
| from bs4 import BeautifulSoup | |
| scraper = cloudscraper.create_scraper() | |
| soup = BeautifulSoup(scraper.get("https://downdetector.com/").content, "html.parser") | |
| comp = soup.find(class_='companies') | |
| sites = comp.find_all('div', {'class' : 'company-index'}) | |
| for info in sites[:12]: | |
| name = info.find('h5') | |
| reports = info.get('data-hour') | |
| print(name.contents[0], '(' + reports + ')', end=' • ', flush=True) | |
| print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment