Simplify IPD crawler link regex

This commit is contained in:
Joscha
2022-05-08 17:39:18 +02:00
parent 2f0e04ce13
commit 616b0480f7
3 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class KitIpdCrawlerSection(HttpCrawlerSection):
return target
def link_regex(self) -> Pattern[str]:
regex = self.s.get("link_regex", r"^.*/[^/]*\.(?:pdf|zip|c|cpp|java)$")
regex = self.s.get("link_regex", r"^.*?[^/]+\.(pdf|zip|c|cpp|java)$")
return re.compile(regex)