We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac5ef73 commit 2ee2fe9Copy full SHA for 2ee2fe9
2 files changed
src/readability_lxml/encoding.py
@@ -7,8 +7,6 @@
7
8
9
def get_encoding(page):
10
- LOG.info('GET ENCODING')
11
- LOG.info(type(page))
12
text = re.sub('</?[^>]*>\s*', ' ', page)
13
enc = 'utf-8'
14
if not text.strip() or len(text) < 10:
src/readability_lxml/htmls.py
@@ -17,8 +17,10 @@
17
18
19
def build_doc(page):
20
- LOG.info('BUILD DOC')
21
+ """Requires that the `page` not be None"""
+ if page is None:
22
+ LOG.error("Page content is None, can't build_doc")
23
+ return ''
24
if isinstance(page, unicode):
25
page_unicode = page
26
else:
0 commit comments