'Given a vote url and a vote object, extract the voters and
the vote counts from the vote page and update the vote object.'

def _parse_votes(self, url, vote, bill):

    if url.lower().endswith('.pdf'):
        try:
            resp = self.get(url)
        except HTTPError:
            msg = ('No    document    found    at    url    %r' % url)
            self.logger.warning(msg)
            return
        try:
            v = PDFCommitteeVote(url, resp.content, bill)
            return v.asvote()
        except PDFCommitteeVoteParseError:
            self.warning(("Could't    parse    committee    vote    at    %r" % url))
            return
    html = self.get(url).text
    doc = lxml.html.fromstring(html)
    try:
        vals = doc.xpath('//table')[1].xpath('tr/td/text()')
    except IndexError:
        return
    (yes_count, no_count, excused_count, absent_count) = map(int, vals)
    try:
        motion = doc.xpath('//br')[(-1)].tail.strip()
    except:
        motion = vote['action']
    if (not motion):
        motion = vote['action']
    vote['motion'] = motion
    action = vote['action']
    vote_url = vote['vote_url']
    vote = VoteEvent(chamber=vote['chamber'], start_date=vote['date'], motion_text=vote['motion'], result='fail', classification='passage', bill=bill, bill_action=vote['action'])
    vote.pupa_id = vote_url
    vote.add_source(vote_url)
    vote.set_count('yes', yes_count)
    vote.set_count('no', no_count)
    vote.set_count('excused', excused_count)
    vote.set_count('absent', absent_count)
    for text in doc.xpath('//table')[2].xpath('tr/td/text()'):
        if (not text.strip(u'\xa0')):
            continue
        (v, name) = filter(None, text.split(u'\xa0'))
        regex = re.compile('.*?\\((.*?)\\)')
        short_name = re.findall(regex, name)
        if (len(short_name) > 0):
            note = ('Short    Name:    ' + short_name[0])
        else:
            note = ''
        name = re.sub('[\\(\\[].*?[\\)\\]]', '', name)
        if (v == 'Y'):
            vote.yes(name, note=note)
        elif (v == 'N'):
            vote.no(name, note=note)
        elif (v == 'E'):
            vote.vote('excused', name, note=note)
        elif (v == 'A'):
            vote.vote('absent', name, note=note)
    passed = None
    for i in vote_passage_indicators:
        if (i in action):
            passed = True
            break
    for i in vote_failure_indicators:
        if ((i in action) and passed):
            if (no_count >= yes_count):
                passed = False
                break
            else:
                raise Exception(('passage    and    failure    indicatorboth    present    at:    %s' % url))
        if ((i in action) and (passed is None)):
            passed = False
            break
    for i in vote_ambiguous_indicators:
        if (i in action):
            passed = (yes_count > no_count)
            break
    if (passed is None):
        raise Exception(('Unknown    passage    at:    %s' % url))
    vote.result = ('pass' if passed else 'fail')
    return vote
