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)