1 parent e3fb693 commit 3e9f156Copy full SHA for 3e9f156
2 files changed
goose/cleaners.py
@@ -26,8 +26,8 @@
26
27
class DocumentCleaner(object):
28
29
- def __init__(self):
30
-
+ def __init__(self, config):
+ self.config = config
31
self.remove_nodes_re = (
32
"^side$|combx|retweet|mediaarticlerelated|menucontainer|navbar"
33
"|comment|PopularQuestions|contact|foot|footer|Footer|footnote"
goose/crawler.py
@@ -120,7 +120,7 @@ def get_output_formatter(self):
120
return StandardOutputFormatter(self.config)
121
122
def get_document_cleaner(self):
123
- return StandardDocumentCleaner()
+ return StandardDocumentCleaner(self.config)
124
125
def get_document(self, raw_html):
126
doc = Parser.fromstring(raw_html)
0 commit comments