Examples
Input: ("http://start", {"http://start": {"urls": ["http://a", "http://b"], "meta": 1}, "http://a": {"message": "dead end"}, "http://b": "congrats"}, 2)
Expected Output: "http://b"
Explanation: Start returns two next URLs. `http://a` is a dead end, and `http://b` returns `congrats`, so the answer is that final URL.
Input: ("s", {"s": {"urls": ["r"]}, "r": [{"status": 503}, {"status": 503}, "congrats"]}, 2)
Expected Output: "r"
Explanation: URL `r` returns HTTP 503 twice, then succeeds on the third attempt. With `max_retries = 2`, this is allowed.
Input: ("u1", {"u1": {"urls": ["u2"]}, "u2": {"urls": ["u1", "u3"]}, "u3": {"info": "nothing here"}}, 1)
Expected Output: None
Explanation: The crawl contains a cycle between `u1` and `u2`, but no reachable response ever equals `congrats`.
Input: ("done", {"done": "congrats"}, 3)
Expected Output: "done"
Explanation: The starting URL already returns `congrats`, so it is immediately the answer.
Input: ("root", {"root": {"urls": ["bad", "slow"]}, "bad": [[1, 2, 3]], "slow": [{"status": 503}, {"status": 503}, {"status": 503}]}, 1)
Expected Output: None
Explanation: `bad` returns a malformed body (a list body, treated as a dead end). `slow` keeps returning 503 more times than allowed by `max_retries`, so no success is found.