Skip to content

Commit

Permalink
remove hours ending suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
ezwang committed Oct 24, 2018
1 parent da05025 commit 195c8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions penn/fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_schedule(self):
data = []
for item in raw_data["events"]:
out = {
"name": re.sub(r"\s*-?\s*(CLOSED|OPEN)$", "", item["title"], re.I),
"name": re.sub(r"\s*(Hours)?\s*-?\s*(CLOSED|OPEN)$", "", item["title"], re.I),
"all_day": item["all_day"]
}
if not item["all_day"]:
Expand All @@ -54,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": re.sub(r"\s*-?\s*(CLOSED|OPEN)$", "", data[0], re.I),
"name": re.sub(r"\s*(Hours)?\s*-?\s*(CLOSED|OPEN)$", "", 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(),
Expand Down

0 comments on commit 195c8c4

Please sign in to comment.