]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141444: Replace dead URL in urllib.robotparser example (GH-144443)
authorkovan <217326+kovan@users.noreply.github.com>
Wed, 4 Feb 2026 08:45:15 +0000 (09:45 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Feb 2026 08:45:15 +0000 (10:45 +0200)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Doc/library/urllib.robotparser.rst

index 674f646c633bbd1062f25e7df7bf76a2e24ef2e9..ba719ae084e7e0d8dae9f233ecb79ccdd731979b 100644 (file)
@@ -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