(self, robotstxt_body: bytes, spider: Spider | None)
| 88 | |
| 89 | class RerpRobotParser(RobotParser): |
| 90 | def __init__(self, robotstxt_body: bytes, spider: Spider | None): |
| 91 | from robotexclusionrulesparser import RobotExclusionRulesParser # noqa: PLC0415 |
| 92 | |
| 93 | self.spider: Spider | None = spider |
| 94 | self.rp: RobotExclusionRulesParser = RobotExclusionRulesParser() |
| 95 | body_decoded = decode_robotstxt(robotstxt_body, spider) |
| 96 | self.rp.parse(body_decoded) |
| 97 | |
| 98 | @classmethod |
| 99 | def from_crawler(cls, crawler: Crawler, robotstxt_body: bytes) -> Self: |
nothing calls this directly
no test coverage detected