mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-07-12 22:22:30 +02:00
@ -24,6 +24,8 @@ ambiguous situations.
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Generic `ilias-web` crawler and `ilias-web` CLI command
|
- Generic `ilias-web` crawler and `ilias-web` CLI command
|
||||||
|
- Support for the course overview page. Using this URL as a target might cause
|
||||||
|
duplication warnings, as subgroups are listed separately.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Normalization of meeting names in cards
|
- Normalization of meeting names in cards
|
||||||
|
@ -349,6 +349,9 @@ class IliasPage:
|
|||||||
might_be_info = self._soup.find("form", attrs={"name": lambda x: x == "formInfoScreen"}) is not None
|
might_be_info = self._soup.find("form", attrs={"name": lambda x: x == "formInfoScreen"}) is not None
|
||||||
return self._page_type == IliasElementType.INFO_TAB and might_be_info
|
return self._page_type == IliasElementType.INFO_TAB and might_be_info
|
||||||
|
|
||||||
|
def _is_course_overview_page(self) -> bool:
|
||||||
|
return "baseClass=ilmembershipoverviewgui" in self._page_url
|
||||||
|
|
||||||
def _select_content_page_url(self) -> Optional[IliasPageElement]:
|
def _select_content_page_url(self) -> Optional[IliasPageElement]:
|
||||||
tab = self._soup.find(
|
tab = self._soup.find(
|
||||||
id="tab_view_content",
|
id="tab_view_content",
|
||||||
@ -686,8 +689,13 @@ class IliasPage:
|
|||||||
def _find_normal_entries(self) -> List[IliasPageElement]:
|
def _find_normal_entries(self) -> List[IliasPageElement]:
|
||||||
result: List[IliasPageElement] = []
|
result: List[IliasPageElement] = []
|
||||||
|
|
||||||
|
links: List[Tag] = []
|
||||||
# Fetch all links and throw them to the general interpreter
|
# Fetch all links and throw them to the general interpreter
|
||||||
links: List[Tag] = self._soup.select("a.il_ContainerItemTitle")
|
if self._is_course_overview_page():
|
||||||
|
log.explain("Page is a course overview page, adjusting link selector")
|
||||||
|
links.extend(self._soup.select(".il-item-title > a"))
|
||||||
|
else:
|
||||||
|
links.extend(self._soup.select("a.il_ContainerItemTitle"))
|
||||||
|
|
||||||
for link in links:
|
for link in links:
|
||||||
abs_url = self._abs_url_from_link(link)
|
abs_url = self._abs_url_from_link(link)
|
||||||
|
Reference in New Issue
Block a user