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

Fix Funke topics #555

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix regexes
  • Loading branch information
MaxDall committed Jul 17, 2024
commit 84fd294f0a0ff8bdedf3017e11690894b7283031
2 changes: 1 addition & 1 deletion src/fundus/publishers/de/braunschweiger_zeitung.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def topics(self) -> List[str]:
else:
pass
return [
re.sub(r" –.+", "", node.text_content()).strip() for node in self._topics_selector(self.precomputed.doc)
re.sub(r"\s*–.+", "", node.text_content()).strip() for node in self._topics_selector(self.precomputed.doc)
]

@attribute
Expand Down
2 changes: 1 addition & 1 deletion src/fundus/publishers/de/hamburger_abendblatt.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def topics(self) -> List[str]:
return topics
else:
return [
re.sub(r" –.+", "", node.text_content()).strip()
re.sub(r"\s*–.+", "", node.text_content()).strip()
for node in self._topics_selector(self.precomputed.doc)
]
2 changes: 1 addition & 1 deletion src/fundus/publishers/de/morgenpost_berlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def topics(self) -> List[str]:
return topics
else:
return [
re.sub(r" –.+", "", node.text_content()).strip()
re.sub(r"\s*–.+", "", node.text_content()).strip()
for node in self._topics_selector(self.precomputed.doc)
]
2 changes: 1 addition & 1 deletion src/fundus/publishers/de/waz.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def topics(self) -> List[str]:
else:
pass
return [
re.sub(r" :.+", "", node.text_content()).strip() for node in self._topics_selector(self.precomputed.doc)
re.sub(r"\s*:.+", "", node.text_content()).strip() for node in self._topics_selector(self.precomputed.doc)
]

class V1_1(V1):
Expand Down
Loading