I am using Beautiful Soup and I have this bit of code :
<div class="tomato"></div>
And when I do:
from bs4 import BeautifulSoup
for div in soup.find_all('div'):
print(div.get('class'))
I get [u'tomato']
. Is there any way to change this code to get only "tomato" without all the other characters?
I also have a few divs that have multiple classes.