Handling “class” attribute in Beautifulsoup

Using the docs it can be difficult to spot the syntax to find an element with a class. Here is how you refine your search to the elements with my-image class.

img = soup.findAll("img", { "class" : "my-image" })

Further reading: