📜  Scrapy-Web服务

📅  最后修改于: 2020-10-31 14:41:32             🧑  作者: Mango


描述

可以通过JSON-RPC来控制正在运行的Scrapy Web搜寻器。通过JSONRPC_ENABLED设置启用它。该服务通过JSON-RPC 2.0协议提供对主搜寻器对象的访问。用于访问搜寻器对象的端点为-

http://localhost:6080/crawler

下表包含一些显示Web服务行为的设置-

Sr.No Setting & Description Default Value
1

JSONRPC_ENABLED

This refers to the boolean, which decides the web service along with its extension will be enabled or not.

True
2

JSONRPC_LOGFILE

This refers to the file used for logging HTTP requests made to the web service. If it is not set the standard Scrapy log will be used.

None
3

JSONRPC_PORT

This refers to the port range for the web service. If it is set to none, then the port will be dynamically assigned.

[6080, 7030]
4

JSONRPC_HOST

This refers to the interface the web service should listen on.

‘127.0.0.1’