Exemplo n.º 1
0
 def scrape_2008RS(self, chamber, session, url):
     """Scraper for pre 2008 Regualar Sessions"""
     year_label, session_type = get_session_details(session)
     chamber_string = get_chamber_string(url, chamber)
     bill_list_url = url % (year_label, chamber_string)
     with self.urlopen(bill_list_url) as page:
         page = lxml.html.fromstring(page)
         page.make_links_absolute(bill_list_url)
         table = page.xpath('//table[tr/th[contains(., "Measure")]]')[0]
         for row in table.xpath('tr'):
             self.scrape_2008RS_row(chamber, session, row)
Exemplo n.º 2
0
 def scrape_2008RS(self, chamber, session, url):
     """Scraper for pre 2008 Regualar Sessions"""
     year_label, session_type = get_session_details(session)
     chamber_string = get_chamber_string(url, chamber)
     bill_list_url = url%(year_label, chamber_string)
     with self.urlopen(bill_list_url) as page:
         page = lxml.html.fromstring(page)
         page.make_links_absolute(bill_list_url)
         table = page.xpath('//table[tr/th[contains(., "Measure")]]')[0]
         for row in table.xpath('tr'):
             self.scrape_2008RS_row(chamber, session, row)
Exemplo n.º 3
0
 def scrape_regular(self, chamber, session, url):
     """Scraper for post 2009 Regular Sessions."""
     year_label, session_type = get_session_details(session)
     chamber_string = get_chamber_string(url, chamber)
     bill_list_url = url%(year_label, chamber_string)
     with self.urlopen(bill_list_url) as page:
         page = lxml.html.fromstring(page)
         page.make_links_absolute(bill_list_url)
         table = page.xpath('//table[contains(@id, "ReportGridView")]')[0]
         for row in table.xpath('tr'):
             self.scrape_regular_row(chamber, session, row)
Exemplo n.º 4
0
 def scrape_2009RS(self, chamber, session, url):
     """Scraper for post 2009 Regular Sessions."""
     year_label, session_type = get_session_details(session)
     chamber_string = get_chamber_string(url, chamber)
     bill_list_url = url % (year_label, chamber_string)
     with self.urlopen(bill_list_url) as page:
         page = lxml.html.fromstring(page)
         page.make_links_absolute(bill_list_url)
         table = page.xpath('//table[contains(@id, "ReportGridView")]')[0]
         for row in table.xpath('tr'):
             # import pdb; pdb.set_trace()
             self.scrape_2009RS_row(chamber, session, row)