From 874a0c467c64a98351ed19ab6c1d39a072ce5acd Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Sun, 5 Aug 2018 10:38:26 -0400 Subject: [PATCH] remove closed from fitness name --- penn/fitness.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/penn/fitness.py b/penn/fitness.py index 7b9f016..2712623 100644 --- a/penn/fitness.py +++ b/penn/fitness.py @@ -1,3 +1,4 @@ +import re import requests import datetime import pytz @@ -53,7 +54,7 @@ def get_usage(self): data = [x.strip() for x in item.get_text("\n").strip().split("\n")] data = [x for x in data if x] output.append({ - "name": data[0], + "name": re.sub(r"\s*-\s*CLOSED$", "", data[0], re.I), "open": "Open" in data[1], "count": int(data[2].rsplit(" ", 1)[-1]), "updated": eastern.localize(datetime.datetime.strptime(data[3][8:].strip(), '%m/%d/%Y %I:%M %p')).isoformat(),