Pergunta

html5lib Observa que é o lançamento mais recente (0.11) tem um pouco de idade. Usando a parte Python, tenho problemas de recursão, conforme observado em Edição 70 e Edição 59 Mas não consigo encontrar uma revisão mercurial recente que seja estável.

A última dica não é boa, recebi o seguinte erro de 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

E recebo os seguintes erros em tempo de execução:

    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)

Estou usando no Python 2.5.2 com LXML e BeautifulSoup.

Foi útil?

Solução

Em janeiro de 2010, parece que a versão 0.90 é o que você deseja:

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top