Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-141444: Replace dead URL in urllib.robotparser example (GH-144443)
(cherry picked from commit 34e5a63)

Co-authored-by: kovan <217326+kovan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
  • Loading branch information
2 people authored and miss-islington committed Feb 4, 2026
commit 8937e7636a1b318882f267bda5b2ed670a26dbdc
12 changes: 6 additions & 6 deletions Doc/library/urllib.robotparser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading