Skip to content

Commit

Permalink
WA: Tweak EmptyScrape Exception on Events
Browse files Browse the repository at this point in the history
  • Loading branch information
braykuka committed Aug 13, 2024
1 parent 694d9f1 commit 36c4fc3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scrapers/wa/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ def scrape(self, chamber=None, session=None, start=None, end=None):
end = datetime.datetime.strptime(end, "%Y-%m-%d").strftime(print_format)

chambers = [chamber] if chamber else ["upper", "lower", "joint"]

event_count = 0
for chamber in chambers:
yield from self.scrape_chamber(chamber, session, start, end)
for event in self.scrape_chamber(chamber, session, start, end):
event_count += 1
yield event
if event_count < 1:
raise EmptyScrape

# Only need to fetch the XML once for both chambers
def get_xml(self, start, end):
Expand Down

0 comments on commit 36c4fc3

Please sign in to comment.