MCPcopy Index your code
hub / github.com/python/cpython / set_url

Method set_url

Lib/urllib/robotparser.py:69–72  ·  view source on GitHub ↗

Sets the URL referring to a robots.txt file.

(self, url)

Source from the content-addressed store, hash-verified

67 self.last_checked = time.time()
68
69 def set_url(self, url):
70 """Sets the URL referring to a robots.txt file."""
71 self.url = url
72 self.host, self.path = urllib.parse.urlsplit(url)[1:3]
73
74 def read(self):
75 """Reads the robots.txt URL and feeds it to the parser."""

Callers 3

testReadMethod · 0.95
__init__Method · 0.95

Calls

no outgoing calls

Tested by 2

testReadMethod · 0.76