Skip to content

Commit

Permalink
add substitution pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxDall committed Oct 22, 2024
1 parent bfc26d3 commit 9a997d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/fundus/publishers/de/braunschweiger_zeitung.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime
import re
from typing import Any, Dict, List, Optional, Pattern, Union
from typing import List, Optional, Pattern

from lxml.etree import XPath

Expand Down Expand Up @@ -57,7 +57,9 @@ def topics(self) -> List[str]:

@attribute
def authors(self) -> List[str]:
return generic_author_parsing(self.precomputed.ld.bf_search("author", default=[]))
return apply_substitution_pattern_over_list(
generic_author_parsing(self.precomputed.ld.bf_search("author")), self._author_substitution_pattern
)

@attribute
def publishing_date(self) -> Optional[datetime.datetime]:
Expand Down

0 comments on commit 9a997d1

Please sign in to comment.