diff --git a/src/readability_lxml/encoding.py b/src/readability_lxml/encoding.py index b80a354..b857955 100644 --- a/src/readability_lxml/encoding.py +++ b/src/readability_lxml/encoding.py @@ -7,8 +7,6 @@ LOG = logging.getLogger() def get_encoding(page): - LOG.info('GET ENCODING') - LOG.info(type(page)) text = re.sub(']*>\s*', ' ', page) enc = 'utf-8' if not text.strip() or len(text) < 10: diff --git a/src/readability_lxml/htmls.py b/src/readability_lxml/htmls.py index 9741427..a401625 100644 --- a/src/readability_lxml/htmls.py +++ b/src/readability_lxml/htmls.py @@ -17,8 +17,10 @@ LOG = logging.getLogger() def build_doc(page): - LOG.info('BUILD DOC') - LOG.info(type(page)) + """Requires that the `page` not be None""" + if page is None: + LOG.error("Page content is None, can't build_doc") + return '' if isinstance(page, unicode): page_unicode = page else: