From f0e56a8e12cd98a9bccf64c98645c184a516a9a9 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Fri, 9 May 2025 11:37:34 +0200 Subject: [PATCH] Dump html after login failure --- PFERD/crawl/ilias/ilias_web_crawler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PFERD/crawl/ilias/ilias_web_crawler.py b/PFERD/crawl/ilias/ilias_web_crawler.py index 3b78e5d..b0bba31 100644 --- a/PFERD/crawl/ilias/ilias_web_crawler.py +++ b/PFERD/crawl/ilias/ilias_web_crawler.py @@ -983,6 +983,8 @@ instance's greatest bottleneck. soup = IliasSoup(soupify(await request.read()), str(request.url)) if IliasPage.is_logged_in(soup): return self._verify_page(soup, url, root_page_allowed) + with open("/tmp/ilias_debug.html", "w") as f: + f.write(str(soup.soup.prettify())) raise CrawlError(f"get_page failed even after authenticating on {url!r}") @staticmethod