page = """
<tr class="class1 class2 class3">1</tr>
<tr class="class1 class2 class3">2</tr>
<tr class="class1 class5">3</tr>
<tr class="class1_a class5_a">4</tr>
<tr class="class1 class5">5</tr>
<tr class="class1_a class5_a">6</tr>
<tr>7</tr>"""
soup = BeautifulSoup(page)
rows = soup.find_all('tr', {'class': re.compile('class1.*')})
for row in rows:
    cls = row.attrs.get('class')
Выбор определенных тегов <tr> с помощью BeautifulSoup