How do I iterate over the HTML attributes of a Beautiful Soup element?
Like, given:
xyz
from BeautifulSoup import BeautifulSoup page = BeautifulSoup('xyz') for attr, value in page.find('foo').attrs: print attr, "=", value # Prints: # bar = asdf # blah = 123