Fixed #49. Bump to 0.6.0.4

pull/73/head
Yuri Baburov 9 years ago
parent c51886d923
commit fcdbe563a5

@ -110,7 +110,14 @@ class Document:
doc = html_cleaner.clean_html(doc)
base_href = self.url
if base_href:
doc.make_links_absolute(base_href, resolve_base_href=True)
# trying to guard against bad links like <a href="http://[http://...">
try:
# such support is added in lxml 3.3.0
doc.make_links_absolute(base_href, resolve_base_href=True, handle_failures='discard')
except TypeError: #make_links_absolute() got an unexpected keyword argument 'handle_failures'
# then we have lxml < 3.3.0
# please upgrade to lxml >= 3.3.0 if you're failing here!
doc.make_links_absolute(base_href, resolve_base_href=True)
else:
doc.resolve_base_href()
return doc

@ -14,7 +14,7 @@ if sys.platform == 'darwin':
setup(
name="readability-lxml",
version="0.6.0.3",
version="0.6.0.4",
author="Yuri Baburov",
author_email="burchik@gmail.com",
description="fast python port of arc90's readability tool",

Loading…
Cancel
Save