It seems to work for me, so I would say that the problem is with your html document.
I tried to run the following:
from bs4 import BeautifulSoup
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"}))
And as a result, I got:
[<a class="black">
<b>
text1
</b>
<c>
text2
</c>
</a>, <a class="black">
</a>]
Edit: As @Puneet pointed out , the problem may be the lack of a space between the attributes in the html that you are "fetching".
I tried, for example, changing the above example to something like:
html_doc = """<html>
<body>
<aclass="black">
# etc.. as before
And I got an empty list: [].