From da1cb06b357f690ab2f03e366af5bd45fdbc1c92 Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 20:52:58 +0100 Subject: [PATCH] gh-141444: Replace dead URL in urllib.robotparser example Replace the defunct musi-cal.com URL with pythontest.net in the RobotFileParser documentation example. This uses CPython-controlled infrastructure and provides non-None values for request_rate and crawl_delay, addressing feedback from previous PR #141461. Co-Authored-By: Claude Opus 4.5 --- Doc/library/urllib.robotparser.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/urllib.robotparser.rst b/Doc/library/urllib.robotparser.rst index 674f646c633bbd..ba719ae084e7e0 100644 --- a/Doc/library/urllib.robotparser.rst +++ b/Doc/library/urllib.robotparser.rst @@ -91,16 +91,16 @@ class:: >>> import urllib.robotparser >>> rp = urllib.robotparser.RobotFileParser() - >>> rp.set_url("http://www.musi-cal.com/robots.txt") + >>> rp.set_url("http://www.pythontest.net/robots.txt") >>> rp.read() >>> rrate = rp.request_rate("*") >>> rrate.requests - 3 + 1 >>> rrate.seconds - 20 + 1 >>> rp.crawl_delay("*") 6 - >>> rp.can_fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco") - False - >>> rp.can_fetch("*", "http://www.musi-cal.com/") + >>> rp.can_fetch("*", "http://www.pythontest.net/") True + >>> rp.can_fetch("*", "http://www.pythontest.net/no-robots-here/") + False