From 30ac95a5cf3c2f8e201fda483ad0f71e15fa444a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 12 Jun 2026 12:02:44 +0200 Subject: [PATCH] fix: show source pages for broken/unreachable external links in report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The broken_links entries already contained a pages[] list, but _render_markdown didn't display it. Now each broken link shows up to 3 pages where it was found ("gefunden auf: …"). Also adds error_links (connection errors) to the main scan report with the same source-page annotation. Co-Authored-By: Claude Sonnet 4.6 --- scanner/__main__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scanner/__main__.py b/scanner/__main__.py index 616cced..3704aae 100644 --- a/scanner/__main__.py +++ b/scanner/__main__.py @@ -365,6 +365,12 @@ def _render_markdown(r: dict) -> str: f"nicht erreichbar: {el.get('errors', 0)}") for entry in el.get("broken_links", []): lines.append(f"- HTTP {entry['status']}: `{entry['url']}`") + for page in entry.get("pages", [])[:3]: + lines.append(f" - gefunden auf: {page}") + for entry in el.get("error_links", []): + lines.append(f"- Nicht erreichbar: `{entry['url']}` ({entry.get('error', '?')})") + for page in entry.get("pages", [])[:3]: + lines.append(f" - gefunden auf: {page}") lines += [ "",