html5lib 哪个版本是稳定的?

发布于 2024-07-26 09:35:08 字数 1141 浏览 6 评论 0原文

html5lib 指出,它的最新版本 (0.11) 有点旧。 使用 Python 部分时,我遇到了递归问题,如问题 70 和第 59 期,但找不到最近的Mercurial 版本稳定。

最新的提示不好,我从 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

并且在运行时收到以下错误:

    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)

我在 Python 2.5.2 上使用 lxml 和 BeautifulSoup 。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

§对你不离不弃 2024-08-02 09:35:08

截至 2010 年 1 月,看起来版本 0.90 就是您想要的:

http://code. google.com/p/html5lib/downloads/list

As of January 2010, it looks like version 0.90 is what you want:

http://code.google.com/p/html5lib/downloads/list

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文