Skip to content

Commit

Permalink
parse current and future events
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancrneto committed Mar 15, 2024
1 parent 1269598 commit 7792bf2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bahea_cal/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ def parse():
except json.JSONDecodeError as e:
print("Error decoding JSON:", e)
else:
soccer_events = instantiate_from_json(parsed_data["SCHEDULE_TEAM"]["teamAgenda"]["future"])
return soccer_events
# past_events = instantiate_from_json(parsed_data["SCHEDULE_TEAM"]["teamAgenda"]["past"])
past_events = []
current_events = instantiate_from_json(parsed_data["SCHEDULE_TEAM"]["teamAgenda"]["now"])
future_events = instantiate_from_json(parsed_data["SCHEDULE_TEAM"]["teamAgenda"]["future"])
return past_events + current_events + future_events
else:
print("JavaScript object not found in the HTML content")

0 comments on commit 7792bf2

Please sign in to comment.