Classes
LinkCheckOrchestrator
Orchestrates link checking across internal and external links.
Features:
- Extracts links from all…
LinkCheckOrchestrator
Orchestrates link checking across internal and external links.
Features:
- Extracts links from all pages
- Separates internal vs external
- Checks both concurrently
- Applies ignore policies
- Returns consolidated results
Methods 3
check_all_links
Check all links in the site.
check_all_links
def check_all_links(self) -> tuple[list[LinkCheckResult], LinkCheckSummary]
Check all links in the site.
Returns
Tuple of (results list, summary)tuple[list[LinkCheckResult], LinkCheckSummary]
—
format_json_report
Format results as JSON report.
format_json_report
def format_json_report(self, results: list[LinkCheckResult], summary: LinkCheckSummary) -> dict[str, Any]
Format results as JSON report.
Parameters 2
results |
list[LinkCheckResult] |
List of check results |
summary |
LinkCheckSummary |
Summary statistics |
Returns
JSON-serializable dictdict[str, Any]
—
format_console_report
Format results as console report.
format_console_report
def format_console_report(self, results: list[LinkCheckResult], summary: LinkCheckSummary) -> str
Format results as console report.
Parameters 2
results |
list[LinkCheckResult] |
List of check results |
summary |
LinkCheckSummary |
Summary statistics |
Returns
Formatted string for console outputstr
—
Internal Methods 3
__init__
Initialize link check orchestrator.
__init__
def __init__(self, site: Site, check_internal: bool = True, check_external: bool = True, config: dict[str, Any] | None = None)
Initialize link check orchestrator.
Parameters 4
site |
Site |
Site instance |
check_internal |
bool |
Whether to check internal links |
check_external |
bool |
Whether to check external links |
config |
dict[str, Any] | None |
Configuration dict for checkers |
_extract_links
Extract all links from built HTML files, separated by internal vs external.
_extract_links
def _extract_links(self) -> tuple[list[tuple[str, str]], list[tuple[str, str]]]
Extract all links from built HTML files, separated by internal vs external.
Returns
Tuple of (internal_links, external_links) where each is a list of
(url, page_path) tuplestuple[list[tuple[str, str]], list[tuple[str, str]]]
—
_build_summary
Build summary from results.
_build_summary
def _build_summary(self, results: list[LinkCheckResult], duration_ms: float) -> LinkCheckSummary
Build summary from results.
Parameters 2
results |
list[LinkCheckResult] |
List of check results |
duration_ms |
float |
Total duration in milliseconds |
Returns
LinkCheckSummaryLinkCheckSummary
—