Skip to content

Commit

Permalink
fix content type
Browse files Browse the repository at this point in the history
  • Loading branch information
indiejoseph committed Mar 9, 2025
1 parent 4cd2682 commit 3de71c9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions scraper/api_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def parse_article(self, item: dict) -> ScraperOutput:
article_id,
title,
category=self.category,
content_type=self.content_type,
content=content,
author=author,
date=date,
Expand Down
1 change: 1 addition & 0 deletions scraper/html_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def parse_article(self, tag: "ResultSet[Tag]") -> ScraperOutput:
article_id,
title,
category=self.category,
content_type=self.content_type,
content=content,
author=author,
date=date,
Expand Down
1 change: 1 addition & 0 deletions scraper/rss_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def parse_article(self, item: Dict[str, Any]) -> ScraperOutput:
article_id,
title,
category=self.category,
content_type=self.content_type,
content=content,
author=author,
date=date,
Expand Down
5 changes: 0 additions & 5 deletions scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ async def get_articles(self) -> List[ScraperOutput]:
# filter out None values
articles = [article for article in articles if article is not None]

# add category and content type
for article in articles:
article.category = self.category
article.content_type = self.content_type

return articles

async def fetch_article(self, item: Any) -> Any:
Expand Down

0 comments on commit 3de71c9

Please sign in to comment.