I\'m having trouble parsing HTML elements with \"class\" attribute using Beautifulsoup. The code looks like this
soup = BeautifulSoup(sdata) mydivs = soup.fi
A straight forward way would be :
soup = BeautifulSoup(sdata) for each_div in soup.findAll('div',{'class':'stylelist'}): print each_div
Make sure you take of the casing of findAll, its not findall