2

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)

lxml と BeautifulSoup を使用して Python 2.5.2 で使用しています。

4

1 に答える 1

1

2010 年 1 月の時点で、バージョン 0.90 が必要なようです。

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

于 2010-12-06T11:30:53.890 に答える