class RobotParser:
Known subclasses: scrapy.robotstxt.ProtegoRobotParser
, scrapy.robotstxt.PythonRobotParser
, scrapy.robotstxt.ReppyRobotParser
, scrapy.robotstxt.RerpRobotParser
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. |
scrapy.robotstxt.ProtegoRobotParser
, scrapy.robotstxt.PythonRobotParser
, scrapy.robotstxt.ReppyRobotParser
, scrapy.robotstxt.RerpRobotParser
Parameters | |
crawler:~scrapy.crawler.Crawler instance | crawler which made the request |
robotstxt_body:bytes | content of a robots.txt_ file. |
scrapy.robotstxt.ProtegoRobotParser
, scrapy.robotstxt.PythonRobotParser
, scrapy.robotstxt.ReppyRobotParser
, scrapy.robotstxt.RerpRobotParser
Parameters | |
url:str | Absolute URL |
user_agent:str | User agent |