Merge pull request #3113 from WenbinZhang/master

[MRG+1] Update robotstxt.py
This commit is contained in:
Daniel Graña 2018-02-08 18:22:56 -03:00 committed by GitHub
commit c56f7b3c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class RobotsTxtMiddleware(object):
logger.debug("Forbidden by robots.txt: %(request)s",
{'request': request}, extra={'spider': spider})
self.crawler.stats.inc_value('robotstxt/forbidden')
raise IgnoreRequest()
raise IgnoreRequest("Forbidden by robots.txt")
def robot_parser(self, request, spider):
url = urlparse_cached(request)