class documentation

class RobotParser:

Known subclasses: scrapy.robotstxt.ProtegoRobotParser, scrapy.robotstxt.PythonRobotParser, scrapy.robotstxt.ReppyRobotParser, scrapy.robotstxt.RerpRobotParser

View In Hierarchy

Undocumented

Class Method from​_crawler Parse the content of a robots.txt_ file as bytes. This must be a class method. It must return a new instance of the parser backend.
Method allowed Return True if user_agent is allowed to crawl url, otherwise return False.
@classmethod
@abstractmethod
def from_crawler(cls, crawler, robotstxt_body):
Parse the content of a robots.txt_ file as bytes. This must be a class method. It must return a new instance of the parser backend.
Parameters
crawler:~scrapy.crawler.Crawler instancecrawler which made the request
robotstxt​_body:bytescontent of a robots.txt_ file.
@abstractmethod
def allowed(self, url, user_agent):
Return True if user_agent is allowed to crawl url, otherwise return False.
Parameters
url:strAbsolute URL
user​_agent:strUser agent