From 087db74ff08256eb1adc207a2205b1ea9ad6a62d Mon Sep 17 00:00:00 2001 From: "sungjun.lee" Date: Fri, 19 Apr 2024 17:51:10 +0900 Subject: [PATCH] typo fix to atricle -> article --- newspaper/extractors/content_extractor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/newspaper/extractors/content_extractor.py b/newspaper/extractors/content_extractor.py index b41c5c7..92e8ca0 100755 --- a/newspaper/extractors/content_extractor.py +++ b/newspaper/extractors/content_extractor.py @@ -33,7 +33,7 @@ class ContentExtractor: title_extractor (TitleExtractor): The title extractor object. author_extractor (AuthorsExtractor): The authors extractor object. pubdate_extractor (PubdateExtractor): The publishing date extractor object. - atricle_body_extractor (ArticleBodyExtractor): The article body + article_body_extractor (ArticleBodyExtractor): The article body extractor object. metadata_extractor (MetadataExtractor): The metadata extractor object. categories_extractor (CategoryExtractor): The category extractor object. @@ -46,7 +46,7 @@ def __init__(self, config: Configuration): self.title_extractor = TitleExtractor(config) self.author_extractor = AuthorsExtractor(config) self.pubdate_extractor = PubdateExtractor(config) - self.atricle_body_extractor = ArticleBodyExtractor(config) + self.article_body_extractor = ArticleBodyExtractor(config) self.metadata_extractor = MetadataExtractor(config) self.categories_extractor = CategoryExtractor(config) self.image_extractor = ImageExtractor(config) @@ -138,7 +138,7 @@ def top_node(self) -> lxml.html.Element: Returns: lxml.html.Element: The top node containing the article text """ - return self.atricle_body_extractor.top_node + return self.article_body_extractor.top_node @property def top_node_complemented(self) -> lxml.html.Element: @@ -147,7 +147,7 @@ def top_node_complemented(self) -> lxml.html.Element: Returns: lxml.html.Element: deepcopy version of the top node, cleaned """ - return self.atricle_body_extractor.top_node_complemented + return self.article_body_extractor.top_node_complemented def calculate_best_node( self, doc: lxml.html.Element @@ -164,9 +164,9 @@ def calculate_best_node( lxml.html.Element: the article top element (most probable container of the article text), or None """ - self.atricle_body_extractor.parse(doc) + self.article_body_extractor.parse(doc) - return self.atricle_body_extractor.top_node + return self.article_body_extractor.top_node def get_videos( self, doc: lxml.html.Element, top_node: lxml.html.Element