diff options
Diffstat (limited to 'fetch-status.py')
-rwxr-xr-x | fetch-status.py | 6 |
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={ |