fix: show source pages for broken/unreachable external links in report

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 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-12 12:02:44 +02:00
commit 30ac95a5cf

View file

@ -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 += [
"",