summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.robotparser.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-23 11:23:31 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-23 11:23:31 (GMT)
commit0f7ede45693be57ba51c7aa23a0d841f160de874 (patch)
tree42f8f578bdf60432c9056b2e300529efb1d9c6b4 /Doc/library/urllib.robotparser.rst
parentaca8fd7a9dc96143e592076fab4d89cc1691d03f (diff)
downloadcpython-0f7ede45693be57ba51c7aa23a0d841f160de874.zip
cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.gz
cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.bz2
Review the doc changes for the urllib package creation.
Diffstat (limited to 'Doc/library/urllib.robotparser.rst')
-rw-r--r--Doc/library/urllib.robotparser.rst12
1 files changed, 3 insertions, 9 deletions
diff --git a/Doc/library/urllib.robotparser.rst b/Doc/library/urllib.robotparser.rst
index e351c56..0cac2ad 100644
--- a/Doc/library/urllib.robotparser.rst
+++ b/Doc/library/urllib.robotparser.rst
@@ -1,9 +1,8 @@
-
:mod:`urllib.robotparser` --- Parser for robots.txt
====================================================
.. module:: urllib.robotparser
- :synopsis: Loads a robots.txt file and answers questions about
+ :synopsis: Load a robots.txt file and answer questions about
fetchability of other URLs.
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
@@ -25,42 +24,37 @@ structure of :file:`robots.txt` files, see http://www.robotstxt.org/orig.html.
This class provides a set of methods to read, parse and answer questions
about a single :file:`robots.txt` file.
-
.. method:: set_url(url)
Sets the URL referring to a :file:`robots.txt` file.
-
.. method:: read()
Reads the :file:`robots.txt` URL and feeds it to the parser.
-
.. method:: parse(lines)
Parses the lines argument.
-
.. method:: can_fetch(useragent, url)
Returns ``True`` if the *useragent* is allowed to fetch the *url*
according to the rules contained in the parsed :file:`robots.txt`
file.
-
.. method:: mtime()
Returns the time the ``robots.txt`` file was last fetched. This is
useful for long-running web spiders that need to check for new
``robots.txt`` files periodically.
-
.. method:: modified()
Sets the time the ``robots.txt`` file was last fetched to the current
time.
-The following example demonstrates basic use of the RobotFileParser class. ::
+
+The following example demonstrates basic use of the RobotFileParser class.
>>> import urllib.robotparser
>>> rp = urllib.robotparser.RobotFileParser()