aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-07-02 16:01:20 +0100
committergarret <garret@airmail.cc>2024-07-02 17:34:41 +0100
commit1fa53461d5741d412df1c866ea87bc6e29935350 (patch)
treea3ad81a465b6519f33cbcf4fb37790648a3c2f68
parent1265d1b101155cb19b1fbee05ac1387d1e9baf3c (diff)
downloadagora-status-1fa53461d5741d412df1c866ea87bc6e29935350.tar.gz
agora-status-1fa53461d5741d412df1c866ea87bc6e29935350.tar.bz2
agora-status-1fa53461d5741d412df1c866ea87bc6e29935350.zip
show an error message if the posts/profile isnt accessible
mostly this happens because the forum software says "you have to be logged in to do that" so that's why the error message is what it is, but i think it might be catching things it shouldnt
-rwxr-xr-xfetch-status.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/fetch-status.py b/fetch-status.py
index 1c0522d..26bfb56 100755
--- a/fetch-status.py
+++ b/fetch-status.py
@@ -35,6 +35,14 @@ profile_post = soup.find("div", attrs={
"data-lb-id": re.compile(r"profile\-post\-\d+")
})
+if profile_post is None:
+ print("Content-Type: text/plain; charset=utf-8")
+ print("Status: 403")
+ print()
+ print("🚨🚨🚨 schizo alert! 🚨🚨🚨")
+ print("it won't work if you don't expose your profile to the public, sorry")
+ quit()
+
print("Content-Type: text/html; charset=utf-8")
print()
print(profile_post)