soup = BeautifulSoup(html)
results = soup.findAll('td', {'valign': 'top'})
for result in results:
    if len(result.attrs) == 1:
        pass
How to find tags with only certain attributes - BeautifulSoup