1
extract_dead_links.py
Reads the collection and keeps the entries that are dead, meaning working is false or the status code isn't 200. It sends a HEAD request to each domain's root to see whether the site itself still answers, and caches that, so fifty dead pages on one host cost one request.
writesdead_links.json
2
find_candidates.py
Searches for each dead link and ranks what comes back. It saves after every entry, so a stopped run picks up where it left off and only retries the entries that hit a search or model error.
writescandidates.json
3
review_candidates.py
A review loop in the terminal. It shows the original link, the ranked candidates with their scores and reasons, and the raw search results below. You pick a number, paste your own URL, skip or quit, and progress saves after every decision.
writesfinal_replacements.json