diff --git a/scrapers/nv/events.py b/scrapers/nv/events.py index df77261f18..e82e2601b0 100644 --- a/scrapers/nv/events.py +++ b/scrapers/nv/events.py @@ -4,6 +4,7 @@ from utils import LXMLMixin from utils.media import get_media_type from openstates.scrape import Scraper, Event +from openstates.exceptions import EmptyScrape from spatula import HtmlPage, PdfPage, URL, XPath, SelectorError import re @@ -96,7 +97,7 @@ def process_page(self): meetings.append(cur_row) # Reset cur_row so leftover elements don't get mixed in with next set of divs cur_row = [] - + event_count = 0 for i in meetings: # First element contains: the title and date title = XPath(".//h3/a[1]/text()").match_one(i[0]) @@ -210,6 +211,9 @@ def process_page(self): event.add_bill(bill) yield event + event_count += 1 + if event_count < 1: + raise EmptyScrape class NVEventScraper(Scraper, LXMLMixin):