I\'m having trouble parsing HTML elements with \"class\" attribute using Beautifulsoup. The code looks like this
soup = BeautifulSoup(sdata)
mydivs = soup.fi
From the documentation:
As of Beautiful Soup 4.1.2, you can search by CSS class using the keyword argument class_
:
soup.find_all("a", class_="sister")
Which in this case would be:
soup.find_all("div", class_="stylelistrow")
It would also work for:
soup.find_all("div", class_="stylelistrowone stylelistrowtwo")