Skip to content

Instantly share code, notes, and snippets.

@cmj
Last active October 20, 2025 13:38
Show Gist options
  • Select an option

  • Save cmj/1d8bb93ff2b21dda999cd288a3ab07f5 to your computer and use it in GitHub Desktop.

Select an option

Save cmj/1d8bb93ff2b21dda999cd288a3ab07f5 to your computer and use it in GitHub Desktop.
Simple downdetector top outages with cloudscraper (anti-clownflare)
#!/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