if a page has , then
soup.findAll(True, \'class1\')
will find them both.
It’s very useful to search for a tag that has a certain CSS class, but the name of the CSS attribute, “class”, is a reserved word in Python. Using class as a keyword argument will give you a syntax error. As of Beautiful Soup 4.1.2, you can search by CSS class using the keyword argument class_:
Like:
soup.find_all("a", class_="class1")