From 98a2b5db3446f1082b65d9563a0a63c9f98a28b4 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 27 Nov 2018 10:28:39 +0000 Subject: [PATCH] Fix tut crawling --- PFERD/ilias.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PFERD/ilias.py b/PFERD/ilias.py index 438e6bd..5b918fd 100644 --- a/PFERD/ilias.py +++ b/PFERD/ilias.py @@ -91,6 +91,10 @@ class ILIAS: def _find_dirs(self, soup): dirs = [] + found = soup.find_all("div", {"class": "alert", "role": "alert"}) + if found: + return [] + found = soup.find_all("a", {"class": "il_ContainerItemTitle", "href": self.DIR_RE}) for element in found: dir_name = element.string.strip()