'Scrape legislator information for the 2015-2016 term.
The legislators page has an inactive dropdown to select the session.
When the dropdown is activated and we can see how it changes the
page\'s query parameters, this scraper should be modified to
filter to a session appropriate for the term.'

def scrape(self, chamber=None):

    if chamber:
        co_internal_chamber_ids = [CHAMBER_TO_CO_INTERNAL_CHAMBER_ID[chamber]]
    else:
        co_internal_chamber_ids = [CHAMBER_TO_CO_INTERNAL_CHAMBER_ID['lower'], CHAMBER_TO_CO_INTERNAL_CHAMBER_ID['upper']]
    for co_internal_chamber_id in co_internal_chamber_ids:
        chamber = ('upper' if (co_internal_chamber_id == CHAMBER_TO_CO_INTERNAL_CHAMBER_ID['upper']) else 'lower')
        filtered_legislators_page_url = '{legislators_url}/?field_chamber_target_id={internal_chamber_id}'.format(legislators_url=self.legislators_url, internal_chamber_id=co_internal_chamber_id)
        filtered_legislators_page = self.lxmlize(filtered_legislators_page_url)
        for row in filtered_legislators_page.xpath('//table//tr'):
            (legislator, profile_url) = table_row_to_legislator_and_profile_url(row, chamber)
            legislator_profile_page = self.lxmlize(profile_url)
            legislator.image = get_photo_url(legislator_profile_page)
            legislator.add_source(profile_url)
            legislator.add_source(self.legislators_url)
            legislator.add_link(profile_url)
            (yield legislator)
