aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfetch-status.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/fetch-status.py b/fetch-status.py
index c872a71..684ee9a 100755
--- a/fetch-status.py
+++ b/fetch-status.py
@@ -8,7 +8,11 @@ import os
profile_id = os.environ['QUERY_STRING'].strip()
-profile_html = requests.get("https://forum.agoraroad.com/index.php?members/" + profile_id).text
+headers = {
+ 'User-Agent': f'agora status fetcher - contact forum user "garret 427738" or https://427738.xyz/hate-mail.html - requested by {os.environ.get("REMOTE_ADDR")}',
+}
+
+profile_html = requests.get("https://forum.agoraroad.com/index.php?members/" + profile_id, headers=headers).text
soup = BeautifulSoup(profile_html, 'lxml')
profile_post = soup.find("div", attrs={