From 987570bef0edcca7ae8eaad83159bbf44282ed88 Mon Sep 17 00:00:00 2001 From: Yuri Baburov Date: Mon, 27 Apr 2015 15:59:31 +0600 Subject: [PATCH] Updated package links for Python 2.7 and Python 3 support --- readability/htmls.py | 5 +++-- readability/readability.py | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/readability/htmls.py b/readability/htmls.py index 15eada3..536b21b 100644 --- a/readability/htmls.py +++ b/readability/htmls.py @@ -1,10 +1,11 @@ -from cleaners import normalize_spaces, clean_attributes -from encoding import get_encoding from lxml.html import tostring import logging import lxml.html import re, sys +from .cleaners import normalize_spaces, clean_attributes +from .encoding import get_encoding + utf8_parser = lxml.html.HTMLParser(encoding='utf-8') def build_doc(page): diff --git a/readability/readability.py b/readability/readability.py index 680505a..255e877 100755 --- a/readability/readability.py +++ b/readability/readability.py @@ -9,12 +9,12 @@ from lxml.etree import tounicode from lxml.html import document_fromstring from lxml.html import fragment_fromstring -from cleaners import clean_attributes -from cleaners import html_cleaner -from htmls import build_doc -from htmls import get_body -from htmls import get_title -from htmls import shorten_title +from .cleaners import clean_attributes +from .cleaners import html_cleaner +from .htmls import build_doc +from .htmls import get_body +from .htmls import get_title +from .htmls import shorten_title logging.basicConfig(level=logging.INFO)