Skip to content

Commit

Permalink
Merge pull request #377 from flairNLP/update-telegraph
Browse files Browse the repository at this point in the history
TheTelegraph: add subheadline selector
  • Loading branch information
addie9800 authored Feb 26, 2024
2 parents f856b16 + 54fd984 commit f117e49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fundus/publishers/uk/the_telegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class TheTelegraphParser(ParserProxy):
class V1(BaseParser):
_paragraph_selector = CSSSelector("div.articleBodyText p")
_subheadline_selector = CSSSelector("div.articleBodyText h2")
_summary_selector = CSSSelector("p[itemprop='description']")
_datetime_selector = CSSSelector("time[itemprop='datePublished']")

Expand All @@ -24,6 +25,7 @@ def body(self) -> ArticleBody:
self.precomputed.doc,
summary_selector=self._summary_selector,
paragraph_selector=self._paragraph_selector,
subheadline_selector=self._subheadline_selector,
)
return body

Expand Down

0 comments on commit f117e49

Please sign in to comment.