mechanize
mechanize copied to clipboard
Add support for HTML parsing libraries
Python libraries for parsing HTML have improved. mechanize doesn't support three of the most popular choices of the current crop.
Expect: can use some mechanize API to request that one of these libraries is used to parse HTML:
lxml.html BeautifulSoup 3 html5lib
Got: can only use bundled BeautifulSoup v.2 or Python's sgmllib or SGMLParser modules.
I just hit:
ParseError('nested FORMs',)
An HTML parser that never raised exceptions would help in this case.
Barring that, is there some way for me to reach in and edit the HTML before .forms() tries to parse it?