mirror of
https://github.com/bookieio/breadability
synced 2024-11-04 12:00:19 +00:00
Remove code we didn't need
This commit is contained in:
parent
326fbfe107
commit
c2f935bf51
@ -185,25 +185,6 @@ def check_siblings(candidate_node, candidate_list):
|
|||||||
return candidate_node
|
return candidate_node
|
||||||
|
|
||||||
|
|
||||||
def debug_article(doc):
|
|
||||||
"""Process the article much as we do in prep_article
|
|
||||||
|
|
||||||
Only we're going to do some debugging output instead.
|
|
||||||
|
|
||||||
"""
|
|
||||||
clean_list = ['object', 'h1']
|
|
||||||
LNODE.log(doc, 2, "Processing doc")
|
|
||||||
|
|
||||||
if len(doc.findall('.//h2')) == 1:
|
|
||||||
LOG.debug('Adding H2 to list of nodes to clean.')
|
|
||||||
clean_list.append('h2')
|
|
||||||
|
|
||||||
for n in doc.iter():
|
|
||||||
LNODE.log(n, 2, "Iterating over node")
|
|
||||||
LNODE.log(n, 2, "Link density: " + str(get_link_density(n)))
|
|
||||||
clean_conditionally(n)
|
|
||||||
|
|
||||||
|
|
||||||
def clean_document(node):
|
def clean_document(node):
|
||||||
"""Clean up the final document we return as the readable article"""
|
"""Clean up the final document we return as the readable article"""
|
||||||
LNODE.log(node, 2, "Processing doc")
|
LNODE.log(node, 2, "Processing doc")
|
||||||
|
Loading…
Reference in New Issue
Block a user