html_doc = """<html>
 <body>
  <a class="black">
   <b>
    text1
   </b>
   <c>
    text2
   </c>
  </a>
  <a class="micio">
  </a>
  <a class="black">
  </a>
 </body>
</html>"""
soup = BeautifulSoup(html_doc)
soup.prettify()
print(soup.find_all('a', {'class': 'black'}))
Python BeautifulSoup ищет тег