Skip to content

Commit

Permalink
Simplification of paragraph selector
Browse files Browse the repository at this point in the history
  • Loading branch information
addie9800 committed Feb 5, 2024
1 parent b14dcda commit 447ee9e
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/fundus/publishers/de/braunschweiger_zeitung.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,7 @@ class BSZParser(ParserProxy):
class V1(BaseParser):
_author_substitution_pattern: Pattern[str] = re.compile(r"FUNKE Mediengruppe")
_paragraph_selector = XPath(
"//div[@class='article-body']//p[not("
"contains(strong, 'Meistgeklickte Nachrichten aus der Region')"
" or contains(strong, 'Keine wichtigen News mehr verpassen')"
" or @rel='author' or em[@class='print']"
" or contains(a, 'Jetzt Angebot und Vorteile checken')"
" or contains(text(), 'Lesen Sie mehr Geschichten aus')"
" or contains(strong, 'Mehr wichtige Nachrichten aus')"
" or contains(strong, 'Täglich wissen, was in')"
" or contains(strong, 'Auch interessant')"
" or contains(strong, 'Auch interessant')"
" or contains(strong, 'Das könnte Sie auch interessieren')"
" or contains(strong, 'Lesen Sie auch')"
" or contains(strong, 'Mehr zu dem Thema')"
" or contains(strong, 'Mehr zum Thema')"
" or contains(strong, 'Lesen Sie dazu')"
" or contains(strong, 'Lesen Sie hier'))]"
"//div[@class='article-body']//p[not(not(text()) or @rel='author' or em[@class='print'] or position()=1)]"
)
_summary_selector = XPath("//div[@class='article-body']//p[1]")
_subheadline_selector = XPath(
Expand Down

0 comments on commit 447ee9e

Please sign in to comment.