aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-status.py
blob: c872a713427760c09726c1723393601d346ef02a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3
import re

from bs4 import BeautifulSoup
import requests

import os

profile_id = os.environ['QUERY_STRING'].strip()

profile_html = requests.get("https://forum.agoraroad.com/index.php?members/" + profile_id).text
soup = BeautifulSoup(profile_html, 'lxml')

profile_post = soup.find("div", attrs={
	"class": "lbContainer js-lbContainer",
	"data-lb-id": re.compile(r"profile\-post\-\d+")
})

print("Content-Type: text/html; charset=utf-8")
print()
print(profile_post)