Fixed #49. Bump to 0.6.0.4
This commit is contained in:
parent
c51886d923
commit
fcdbe563a5
@ -110,6 +110,13 @@ class Document:
|
|||||||
doc = html_cleaner.clean_html(doc)
|
doc = html_cleaner.clean_html(doc)
|
||||||
base_href = self.url
|
base_href = self.url
|
||||||
if base_href:
|
if base_href:
|
||||||
|
# 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)
|
doc.make_links_absolute(base_href, resolve_base_href=True)
|
||||||
else:
|
else:
|
||||||
doc.resolve_base_href()
|
doc.resolve_base_href()
|
||||||
|
2
setup.py
2
setup.py
@ -14,7 +14,7 @@ if sys.platform == 'darwin':
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="readability-lxml",
|
name="readability-lxml",
|
||||||
version="0.6.0.3",
|
version="0.6.0.4",
|
||||||
author="Yuri Baburov",
|
author="Yuri Baburov",
|
||||||
author_email="burchik@gmail.com",
|
author_email="burchik@gmail.com",
|
||||||
description="fast python port of arc90's readability tool",
|
description="fast python port of arc90's readability tool",
|
||||||
|
Loading…
Reference in New Issue
Block a user