mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Adjust ILIAS html explain messages
This commit is contained in:
parent
a9af56a5e9
commit
79efdb56f7
@ -52,12 +52,12 @@ class IliasPage:
|
||||
log.explain("Page is a video player, extracting URL")
|
||||
return self._player_to_video()
|
||||
if self._is_video_listing():
|
||||
log.explain("Page is a video listing, finding elements")
|
||||
log.explain("Page is a video listing, searching for elements")
|
||||
return self._find_video_entries()
|
||||
if self._is_exercise_file():
|
||||
log.explain("Page is an exercise, finding elements")
|
||||
log.explain("Page is an exercise, searching for elements")
|
||||
return self._find_exercise_entries()
|
||||
log.explain("Page is a normal folder, finding elements")
|
||||
log.explain("Page is a normal folder, searching for elements")
|
||||
return self._find_normal_entries()
|
||||
|
||||
def _is_video_player(self) -> bool:
|
||||
|
@ -206,6 +206,8 @@ class KitIliasWebCrawler(HttpCrawler):
|
||||
raise CrawlError("Invalid course id? Didn't find anything looking like a course")
|
||||
|
||||
# Duplicated code, but the root page is special - we want to avoid fetching it twice!
|
||||
log.explain_topic("Parsing root HTML page")
|
||||
log.explain(f"URL: {url}")
|
||||
page = IliasPage(soup, url, None)
|
||||
elements.extend(page.get_child_elements())
|
||||
|
||||
@ -229,8 +231,8 @@ class KitIliasWebCrawler(HttpCrawler):
|
||||
elements.clear()
|
||||
async with cl:
|
||||
soup = await self._get_page(url)
|
||||
log.explain_topic(f"Parsing HTML page for {path!r}")
|
||||
log.explain(f"URL: {url!r}")
|
||||
log.explain_topic(f"Parsing HTML page for {fmt_path(path)}")
|
||||
log.explain(f"URL: {url}")
|
||||
page = IliasPage(soup, url, parent)
|
||||
|
||||
elements.extend(page.get_child_elements())
|
||||
|
Loading…
Reference in New Issue
Block a user