from BeautifulSoup import BeautifulSoup
soup = BeautifulSoup(resultsPage)
list_items = [list_item for list_item in soup.findAll('li') if list_item.
    findAll('a')]
How do I get at HTML attributes in nested tags with Mechanize in Python?