mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Correctly crawl files on desktop
The files on the desktop do not include a download link, so we need to rewrite it.
This commit is contained in:
parent
eb4de8ae0c
commit
43c5453e10
@ -176,6 +176,11 @@ class IliasPage:
|
||||
continue
|
||||
|
||||
log.explain(f"Found {name!r}")
|
||||
|
||||
if type == IliasElementType.FILE and "_download" not in url:
|
||||
url = re.sub(r"(target=file_\d+)", r"\1_download", url)
|
||||
log.explain("Rewired file URL to include download part")
|
||||
|
||||
items.append(IliasPageElement(type, url, name))
|
||||
|
||||
return items
|
||||
|
Loading…
Reference in New Issue
Block a user