MCPcopy
hub / github.com/scrapy/scrapy / allowed

Method allowed

scrapy/robotstxt.py:83–86  ·  view source on GitHub ↗
(self, url: str | bytes, user_agent: str | bytes)

Source from the content-addressed store, hash-verified

81 return cls(robotstxt_body, spider)
82
83 def allowed(self, url: str | bytes, user_agent: str | bytes) -> bool:
84 user_agent = to_unicode(user_agent)
85 url = to_unicode(url)
86 return self.rp.can_fetch(user_agent, url)
87
88
89class RerpRobotParser(RobotParser):

Callers

nothing calls this directly

Calls 1

to_unicodeFunction · 0.90

Tested by

no test coverage detected