aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfetch-status.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fetch-status.py b/fetch-status.py
index 9cb4be3..d87d6b8 100755
--- a/fetch-status.py
+++ b/fetch-status.py
@@ -34,6 +34,8 @@ posts = soup.find_all("div", class_="message-content js-messageContent")
post_body = None
+data_lb_id_regex = re.compile(r"profile\-post\-\d+")
+
for post in posts:
posted_by_user = post.find("a", attrs={
"class": 'username',
@@ -42,7 +44,7 @@ for post in posts:
if posted_by_user:
post_body = post.find("div", attrs={
"class": "lbContainer js-lbContainer",
- "data-lb-id": re.compile(r"profile\-post\-\d+")
+ "data-lb-id": data_lb_id_regex,
})
break