aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-status.py
diff options
context:
space:
mode:
Diffstat (limited to 'fetch-status.py')
-rwxr-xr-xfetch-status.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/fetch-status.py b/fetch-status.py
index 9aa2480..88e3bb7 100755
--- a/fetch-status.py
+++ b/fetch-status.py
@@ -36,6 +36,7 @@ profile_post = soup.find("div", attrs={
})
is_loginwall = soup.find("html", class_='has-no-js template-login') != None
+is_cloudflare_block = soup.find("title").text == "Just a moment..."
if profile_post is None:
print("Content-Type: text/plain; charset=utf-8")
if is_loginwall:
@@ -43,6 +44,11 @@ if profile_post is None:
print()
print("🚨🚨🚨 schizo alert! 🚨🚨🚨")
print("it won't work if you don't expose your profile to the public, sorry")
+ elif is_cloudflare_block:
+ print("status: 403")
+ print()
+ print("blocked by cloudflare :(")
+ print("i've found it to work from my home ip, probably this is hosted on a datacentre one...")
else:
print("Status: 500")
print()