@@ -24,14 +24,15 @@ structure of :file:`robots.txt` files, see :rfc:`9309`.
2424.. class :: RobotFileParser(url_or_request='')
2525
2626 This class provides methods to read, parse and answer questions about the
27- :file: `robots.txt ` file at *url * or a :class: `Request ` object with additional
28- user-agent headers populated.
27+ :file: `robots.txt ` file at *url * or a :class: `urllib.request. Request ` object
28+ with additional user-agent headers populated.
2929
3030
3131 .. method :: set_url(url_or_request)
3232
33- Sets the URL referring to a :file: `robots.txt ` file or a :class: `Request `
34- object with additional user-agent headers populated.
33+ Sets the URL referring to a :file: `robots.txt ` file or a
34+ :class: `urllib.request.Request ` object with additional user-agent headers
35+ populated.
3536
3637 .. method :: read()
3738
@@ -107,7 +108,8 @@ class::
107108 False
108109
109110
110- The following example demonstrates use of a :class: `Request ` object with additional user-agent headers populated::
111+ The following example demonstrates use of a :class: `urllib.request.Request `
112+ object with additional user-agent headers populated::
111113
112114 >>> import urllib.robotparser
113115 >>> import urllib.request
@@ -117,4 +119,4 @@ The following example demonstrates use of a :class:`Request` object with additio
117119 >>> rp.can_fetch("*", "https://en.wikipedia.org/")
118120 True
119121 >>> rp.can_fetch("*", "https://en.wikipedia.org/trap/")
120- False
122+ False
0 commit comments