Find a specific tag with BeautifulSoup

The following should work

soup = BeautifulSoup(htmlstring)
soup.findAll('div', style="width=300px;")

There are couple of ways to search for tags.

  • https://www.crummy.com/software/BeautifulSoup/bs4/doc/#searching-the-tree

For more text to understand and use it

  • http://lxml.de/elementsoup.html

Leave a Comment

tech