fixed regex needs to match whole href

This commit is contained in:
Toorero 2021-11-01 00:22:28 +01:00
parent 08565b22ad
commit 9f7aff761d

View file

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