Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo fix to atricle -> article #636

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions newspaper/extractors/content_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading