Exemplo n.º 1
0
 def scrape_house(self):
     committees_pages = committees_url('lower')
     
     link = committees_pages['permanent']
     with self.lxml_context(link) as perm_committees_pages:
         a_elements = perm_committees_pages.cssselect('a')
         committee_elements = a_elements[1:-7]
         self.scrape_house_committee_data(committee_elements, link)
     
     link = committees_pages['special']
     with self.lxml_context(link) as special_committees_pages:
         a_elements = special_committees_pages.cssselect('a')
         committee_elements = a_elements[1:10]
         self.scrape_house_committee_data(committee_elements, link)
Exemplo n.º 2
0
    def scrape_house(self):
        committees_pages = committees_url('lower')

        link = committees_pages['permanent']
        with self.lxml_context(link) as perm_committees_pages:
            a_elements = perm_committees_pages.cssselect('a')
            committee_elements = a_elements[1:-7]
            self.scrape_house_committee_data(committee_elements, link)

        link = committees_pages['special']
        with self.lxml_context(link) as special_committees_pages:
            a_elements = special_committees_pages.cssselect('a')
            committee_elements = a_elements[1:10]
            self.scrape_house_committee_data(committee_elements, link)
Exemplo n.º 3
0
 def scrape_senate(self):
     committees_pages = committees_url('upper')
     
     link = committees_pages['permanent']
     with self.lxml_context(link) as perm_committees_page:
         td_elements = perm_committees_page.cssselect('td')     
         self.scrape_senate_comittee_data(td_elements[129:201], link)
     
     link = committees_pages['special']
     with self.lxml_context(link) as special_committees_page:
         td_elements = special_committees_page.cssselect('td')         
         self.scrape_senate_comittee_data(td_elements[129:138], link)
     
     link = committees_pages['joint']
     with self.lxml_context(link) as joint_committees_page:
         td_elements = joint_committees_page.cssselect('td')
         self.scrape_senate_comittee_data(td_elements[129:156], link)  
Exemplo n.º 4
0
    def scrape_senate(self):
        committees_pages = committees_url('upper')

        link = committees_pages['permanent']
        with self.lxml_context(link) as perm_committees_page:
            td_elements = perm_committees_page.cssselect('td')
            self.scrape_senate_comittee_data(td_elements[129:201], link)

        link = committees_pages['special']
        with self.lxml_context(link) as special_committees_page:
            td_elements = special_committees_page.cssselect('td')
            self.scrape_senate_comittee_data(td_elements[129:138], link)

        link = committees_pages['joint']
        with self.lxml_context(link) as joint_committees_page:
            td_elements = joint_committees_page.cssselect('td')
            self.scrape_senate_comittee_data(td_elements[129:156], link)