mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Crawl more of the TI page
This commit is contained in:
parent
59c278da2c
commit
2016f61bf8
20
PFERD/ti.py
20
PFERD/ti.py
@ -37,21 +37,12 @@ class Ti:
|
|||||||
|
|
||||||
available = self._find_available(urlpart)
|
available = self._find_available(urlpart)
|
||||||
|
|
||||||
if "Folien" in available:
|
for name, address in sorted(available.items()):
|
||||||
path = pathlib.PurePath("Folien")
|
path = pathlib.PurePath(name)
|
||||||
if filter(path):
|
if filter(path):
|
||||||
self._crawl(urlpart + available["Folien"], path, orga,
|
self._crawl(urlpart + address, path, orga, transform)
|
||||||
transform)
|
|
||||||
else:
|
else:
|
||||||
logger.info("Skipping Folien/")
|
loggwe.info(f"Skipping {name}/")
|
||||||
|
|
||||||
if "Blätter" in available:
|
|
||||||
path = pathlib.PurePath("Blätter")
|
|
||||||
if filter(path):
|
|
||||||
self._crawl(urlpart + available["Blätter"], path, orga,
|
|
||||||
transform)
|
|
||||||
else:
|
|
||||||
logger.info("Skipping Blätter/")
|
|
||||||
|
|
||||||
orga.clean_sync_dir()
|
orga.clean_sync_dir()
|
||||||
orga.clean_temp_dir()
|
orga.clean_temp_dir()
|
||||||
@ -71,6 +62,9 @@ class Ti:
|
|||||||
if soup.find(href="./Uebungen/Uebungen.php"):
|
if soup.find(href="./Uebungen/Uebungen.php"):
|
||||||
logger.info("Found Blätter/")
|
logger.info("Found Blätter/")
|
||||||
available["Blätter"] = "/Uebungen/"
|
available["Blätter"] = "/Uebungen/"
|
||||||
|
if soup.find(href="./Tutorien/Tutorien.php"):
|
||||||
|
logger.info("Found Tutorien/")
|
||||||
|
available["Tutorien"] = "/Tutorien/"
|
||||||
|
|
||||||
return available
|
return available
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user