From 4ad77828e76662227bdeb56fe4c393c69c7f3350 Mon Sep 17 00:00:00 2001 From: PredictiveManish Date: Wed, 12 Nov 2025 16:24:48 +0530 Subject: [PATCH] Fix: Musi-cal to python.org --- Doc/library/urllib.robotparser.rst | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Doc/library/urllib.robotparser.rst b/Doc/library/urllib.robotparser.rst index 674f646c633bbd..2fd55bebfc7b11 100644 --- a/Doc/library/urllib.robotparser.rst +++ b/Doc/library/urllib.robotparser.rst @@ -91,16 +91,13 @@ class:: >>> import urllib.robotparser >>> rp = urllib.robotparser.RobotFileParser() - >>> rp.set_url("http://www.musi-cal.com/robots.txt") + >>> rp.set_url("https://www.python.org/robots.txt") >>> rp.read() - >>> rrate = rp.request_rate("*") - >>> rrate.requests - 3 - >>> rrate.seconds - 20 - >>> 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/") + >>> print(rp.request_rate("*")) + None + >>> print(rp.crawl_delay("*")) + None + >>> rp.can_fetch("*", "https://www.python.org/psf/") True + >>> rp.can_fetch("*", "https://www.python.org/webstats/") + False