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

Method _add_entry

Lib/urllib/robotparser.py:88–95  ·  view source on GitHub ↗
(self, entry)

Source from the content-addressed store, hash-verified

86 self.parse(raw.decode("utf-8", "surrogateescape").splitlines())
87
88 def _add_entry(self, entry):
89 if "*" in entry.useragents:
90 # the default entry is considered last
91 if self.default_entry is None:
92 # the first default entry wins
93 self.default_entry = entry
94 else:
95 self.entries.append(entry)
96
97 def parse(self, lines):
98 """Parse the input lines from a robots.txt file.

Callers 1

parseMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected