diff --git a/PFERD/ffm.py b/PFERD/ffm.py index b20b414..0116176 100644 --- a/PFERD/ffm.py +++ b/PFERD/ffm.py @@ -51,7 +51,7 @@ class FfM: for found in soup.find_all("a", href=self.LINK_RE): url = found["href"] - filename = re.match(self.LINK_RE, url).group(1) + filename = re.match(self.LINK_RE, url).group(1).replace("/", ".") logger.debug(f"Found file {filename} at {url}") old_path = pathlib.PurePath(filename) diff --git a/PFERD/ilias.py b/PFERD/ilias.py index c601cfd..57551e4 100644 --- a/PFERD/ilias.py +++ b/PFERD/ilias.py @@ -80,7 +80,7 @@ class ILIAS: found = soup.find_all("a", {"class": "il_ContainerItemTitle", "href": self.FILE_RE}) for element in found: - file_stem = element.string.strip() + file_stem = element.string.strip().replace("/", ".") file_type = element.parent.parent.parent.find("div", {"class": "il_ItemProperties"}).find("span").string.strip() file_id = re.search(self.FILE_RE, element.get("href")).group(1) @@ -108,7 +108,7 @@ class ILIAS: found = soup.find_all("a", {"class": "il_ContainerItemTitle", "href": self.DIR_RE}) for element in found: - dir_name = element.string.strip() + dir_name = element.string.strip().replace("/", ".") ref_id = re.search(self.DIR_RE, element.get("href")).group(1) dir_id = f"fold_{ref_id}" dirs.append((dir_name, dir_id))