代码之家  ›  专栏  ›  技术社区  ›  zython Hiery Nomus

为什么Chrome需要机器人。txt?

  •  9
  • zython Hiery Nomus  · 技术社区  · 7 年前

    我在日志中注意到,Chrome要求 robots.txt

    [...]
    2017-09-17 15:22:35 - (sanic)[INFO]: Goin' Fast @ http://0.0.0.0:8080
    2017-09-17 15:22:35 - (sanic)[INFO]: Starting worker [26704]
    2017-09-17 15:22:39 - (network)[INFO][127.0.0.1:36312]: GET http://localhost:8080/  200 148
    2017-09-17 15:22:39 - (sanic)[ERROR]: Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/sanic/app.py", line 493, in handle_request
        handler, args, kwargs, uri = self.router.get(request)
      File "/usr/local/lib/python3.5/dist-packages/sanic/router.py", line 307, in get
        return self._get(request.path, request.method, '')
      File "/usr/local/lib/python3.5/dist-packages/sanic/router.py", line 356, in _get
        raise NotFound('Requested URL {} not found'.format(url))
    sanic.exceptions.NotFound: Requested URL /robots.txt not found
    
    2017-09-17 15:22:39 - (network)[INFO][127.0.0.1:36316]: GET http://localhost:8080/robots.txt  404 42
    [...]
    

    我正在运行Chromium:

    60.0.3112.113 (Developer Build) Built on Ubuntu, running on Ubuntu 16.04 (64-bit)

    为什么会这样? 有人能详细说明一下吗?

    2 回复  |  直到 6 年前
        1
  •  9
  •   DWilches    6 年前

    有可能不是你的网站在请求 robots.txt 文件,但其中一个Chrome扩展名(如 Wappalizer 您提到)。这可以解释为什么它只发生在Chrome中。

        2
  •  0
  •   Christoph Bimminger    6 年前

    对于chrome,有一个插件(SeeRobots)可以检查是否有机器人。txt定义搜索引擎等的规则-可能你已经安装了这个插件?

    https://chrome.google.com/webstore/detail/seerobots/hnljoiodjfgpnddiekagpbblnjedcnfp?hl=de