Respect filters in ILIAS crawler

This commit is contained in:
I-Al-Istannen 2021-05-17 21:30:26 +02:00
parent 0bae009189
commit b8efcc2ca5

View File

@ -589,6 +589,9 @@ class KitIliasCrawler(HttpCrawler):
async def _handle_ilias_element(self, parent_path: PurePath, element: IliasPageElement) -> None: async def _handle_ilias_element(self, parent_path: PurePath, element: IliasPageElement) -> None:
element_path = PurePath(parent_path, element.name) element_path = PurePath(parent_path, element.name)
if not self.should_crawl(element_path):
return
if element.type == IliasElementType.FILE: if element.type == IliasElementType.FILE:
await self._download_file(element, element_path) await self._download_file(element, element_path)
elif element.type == IliasElementType.FORUM: elif element.type == IliasElementType.FORUM: