Skip to content

Commit 3e9f156

Browse files
committed
pass config to cleaners init
1 parent e3fb693 commit 3e9f156

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

goose/cleaners.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
class DocumentCleaner(object):
2828

29-
def __init__(self):
30-
29+
def __init__(self, config):
30+
self.config = config
3131
self.remove_nodes_re = (
3232
"^side$|combx|retweet|mediaarticlerelated|menucontainer|navbar"
3333
"|comment|PopularQuestions|contact|foot|footer|Footer|footnote"

goose/crawler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def get_output_formatter(self):
120120
return StandardOutputFormatter(self.config)
121121

122122
def get_document_cleaner(self):
123-
return StandardDocumentCleaner()
123+
return StandardDocumentCleaner(self.config)
124124

125125
def get_document(self, raw_html):
126126
doc = Parser.fromstring(raw_html)

0 commit comments

Comments
 (0)