I\'m looking for an HTML Parser module for Python that can help me get the tags in the form of Python lists/dictionaries/objects.
If I have a document of the form:>
I would use EHP
https://github.com/iogf/ehp
Here it is:
from ehp import * doc = ''' Heading Something here Something else ''' html = Html() dom = html.feed(doc) for ind in dom.find('div', ('class', 'container')): print ind.text()
Output:
Something here Something else