'Attempts to find a portrait in the given legislator profile.'

def _get_photo(self, url, chamber):

    doc = self.lxmlize(url)
    if (chamber == 'upper'):
        src = doc.xpath('//div[@id="page_content"]//img[contains(@src,    "images/senators")    or    contains(@src,    "Senator")]/@src')
    elif (chamber == 'lower'):
        src = doc.xpath('//img[contains(@src,    "images/memberpics")]/@src')
    if (src and ('nophoto' not in src[0])):
        photo_url = src[0]
    else:
        photo_url = ''
    return photo_url
