Which revision of html5lib is stable?
Posted
by
Mat
on Stack Overflow
See other posts from Stack Overflow
or by Mat
Published on 2009-07-13T22:42:51Z
Indexed on
2011/01/09
18:54 UTC
Read the original article
Hit count: 388
html5lib notes that it's latest release (0.11) is somewhat old. Using the Python portion, I have recursion problems as noted in Issue 70 and Issue 59 but can't find a recent Mercurial revision that is stable.
The latest tip is no good, I got the following error from python setup.py install
:
byte-compiling build/bdist.linux-x86_64/egg/html5lib/treewalkers/_base.py to _base.pyc
File "build/bdist.linux-x86_64/egg/html5lib/treewalkers/_base.py", line 40
"data": []}
^
SyntaxError: invalid syntax
And I get the following errors at runtime:
soup = parser.parse(page.read())
File "build/bdist.linux-x86_64/egg/html5lib/html5parser.py", line 165, in parse
File "build/bdist.linux-x86_64/egg/html5lib/html5parser.py", line 144, in _parse
File "build/bdist.linux-x86_64/egg/html5lib/html5parser.py", line 454, in processDoctype
TypeError: insertDoctype() takes exactly 4 arguments (2 given)
I'm using it on Python 2.5.2 with lxml and BeautifulSoup.
© Stack Overflow or respective owner