mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)
This commit is contained in:
parent
0858495a50
commit
3df02dbc8e
4 changed files with 19 additions and 12 deletions
|
|
@ -69,10 +69,10 @@ structure of :file:`robots.txt` files, see http://www.robotstxt.org/orig.html.
|
|||
.. method:: request_rate(useragent)
|
||||
|
||||
Returns the contents of the ``Request-rate`` parameter from
|
||||
``robots.txt`` in the form of a :func:`~collections.namedtuple`
|
||||
``(requests, seconds)``. If there is no such parameter or it doesn't
|
||||
apply to the *useragent* specified or the ``robots.txt`` entry for this
|
||||
parameter has invalid syntax, return ``None``.
|
||||
``robots.txt`` as a :term:`named tuple` ``RequestRate(requests, seconds)``.
|
||||
If there is no such parameter or it doesn't apply to the *useragent*
|
||||
specified or the ``robots.txt`` entry for this parameter has invalid
|
||||
syntax, return ``None``.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue