We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
generic_topic_parsing()
topics
1 parent d9cff35 commit 8c15dd1Copy full SHA for 8c15dd1
src/fundus/publishers/us/rest_of_world.py
@@ -9,6 +9,7 @@
9
extract_article_body_with_selector,
10
generic_author_parsing,
11
generic_date_parsing,
12
+ generic_topic_parsing,
13
image_extraction,
14
)
15
@@ -42,8 +43,7 @@ def title(self) -> Optional[str]:
42
43
44
@attribute
45
def topics(self) -> List[str]:
- keywords: List[str] = self.precomputed.ld.xpath_search("NewsArticle/keywords")
46
- return [keyword for keyword in keywords if not keyword.startswith("Subject: ")]
+ return generic_topic_parsing(self.precomputed.ld.xpath_search("NewsArticle/keywords", scalar=True))
47
48
49
def images(self) -> List[Image]:
0 commit comments