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:
parent
4bae633a41
commit
30ac95a5cf
1 changed files with 6 additions and 0 deletions
|
|
@ -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 += [
|
||||
"",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue