mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Use the exercise label instead of the button name as path
This commit is contained in:
parent
df3ad3d890
commit
8ab462fb87
@ -27,6 +27,8 @@ ambiguous situations.
|
||||
|
||||
### Changed
|
||||
- Use `/` instead of `\` as path separator for (regex) rules on Windows
|
||||
- Use the label to the left for exercises instead of the button name to
|
||||
determine the folder name
|
||||
|
||||
## 3.0.1 - 2021-06-01
|
||||
|
||||
|
@ -293,7 +293,13 @@ class IliasPage:
|
||||
|
||||
# Add each listing as a new
|
||||
for listing in file_listings:
|
||||
file_name = _sanitize_path_name(listing.getText().strip())
|
||||
parent_container: Tag = listing.findParent(
|
||||
"div", attrs={"class": lambda x: x and "form-group" in x}
|
||||
)
|
||||
label_container: Tag = parent_container.find(
|
||||
attrs={"class": lambda x: x and "control-label" in x}
|
||||
)
|
||||
file_name = _sanitize_path_name(label_container.getText().strip())
|
||||
url = self._abs_url_from_link(listing)
|
||||
log.explain(f"Found exercise detail {file_name!r} at {url}")
|
||||
results.append(IliasPageElement(
|
||||
|
Loading…
Reference in New Issue
Block a user