Improved #65 which has given warning, added cssselect lib, bumped to 0.5.1

pull/67/head
Yuri Baburov 9 years ago
parent 1cb17d919b
commit e2bc1ea055

@ -55,3 +55,4 @@ Updates
- 0.3 Added Document.encoding, positive_keywords and negative_keywords
- 0.4 Added Videos loading and allowed more images per paragraph
- 0.5 Preparing a release to support Python versions 2.6, 2.7, 3.3 and 3.4

@ -213,7 +213,7 @@ class Document:
output = document_fromstring('<div/>')
best_elem = best_candidate['elem']
parent = best_elem.getparent()
siblings = parent.getchildren() if parent else [best_elem]
siblings = parent.getchildren() if parent is not None else [best_elem]
for sibling in siblings:
# in lxml there no concept of simple text
# if isinstance(sibling, NavigableString): continue

@ -13,7 +13,7 @@ if sys.platform == 'darwin':
setup(
name="readability-lxml",
version="0.5",
version="0.5.1",
author="Yuri Baburov",
author_email="burchik@gmail.com",
description="fast python port of arc90's readability tool",
@ -24,7 +24,8 @@ setup(
packages=['readability'],
install_requires=[
"chardet",
lxml_requirement
lxml_requirement,
"cssselect"
],
classifiers=[
"Environment :: Web Environment",

Loading…
Cancel
Save