diff options
author | garret <garret@airmail.cc> | 2024-07-02 16:01:20 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-07-02 17:34:41 +0100 |
commit | 1fa53461d5741d412df1c866ea87bc6e29935350 (patch) | |
tree | a3ad81a465b6519f33cbcf4fb37790648a3c2f68 /fetch-status.py | |
parent | 1265d1b101155cb19b1fbee05ac1387d1e9baf3c (diff) | |
download | agora-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
Diffstat (limited to 'fetch-status.py')
-rwxr-xr-x | fetch-status.py | 8 |
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) |