MCPcopy
hub / github.com/scrapy/scrapy / __init__

Method __init__

scrapy/robotstxt.py:110–113  ·  view source on GitHub ↗
(self, robotstxt_body: bytes, spider: Spider | None)

Source from the content-addressed store, hash-verified

108
109class ProtegoRobotParser(RobotParser):
110 def __init__(self, robotstxt_body: bytes, spider: Spider | None):
111 self.spider: Spider | None = spider
112 body_decoded = decode_robotstxt(robotstxt_body, spider)
113 self.rp = Protego.parse(body_decoded)
114
115 @classmethod
116 def from_crawler(cls, crawler: Crawler, robotstxt_body: bytes) -> Self:

Callers

nothing calls this directly

Calls 2

decode_robotstxtFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected