Skip to content

Commit fddd858

Browse files
miss-islingtonkovanclaude
authored
[3.14] gh-141444: Replace dead URL in urllib.robotparser example (GH-144443) (#144464)
Co-authored-by: kovan <217326+kovan@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 360214e commit fddd858

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Doc/library/urllib.robotparser.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ class::
9191

9292
>>> import urllib.robotparser
9393
>>> rp = urllib.robotparser.RobotFileParser()
94-
>>> rp.set_url("http://www.musi-cal.com/robots.txt")
94+
>>> rp.set_url("http://www.pythontest.net/robots.txt")
9595
>>> rp.read()
9696
>>> rrate = rp.request_rate("*")
9797
>>> rrate.requests
98-
3
98+
1
9999
>>> rrate.seconds
100-
20
100+
1
101101
>>> rp.crawl_delay("*")
102102
6
103-
>>> rp.can_fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco")
104-
False
105-
>>> rp.can_fetch("*", "http://www.musi-cal.com/")
103+
>>> rp.can_fetch("*", "http://www.pythontest.net/")
106104
True
105+
>>> rp.can_fetch("*", "http://www.pythontest.net/no-robots-here/")
106+
False

0 commit comments

Comments
 (0)