URL长度过长超限造成Scrapy框架爬虫不执行scrapy.Request函数?(解决方案)

 

解决url参数过长问题,长度超过设置值时,此URL将被略过而不执行。

解决方案:

在Settings文件中,增加以下参数:

URLLENGTH_LIMIT = 5000

以下是官方的说明,可以参考一下:

URLLENGTH_LIMIT
Default: 2083

Scope: spidermiddlewares.urllength

The maximum URL length to allow for crawled URLs. For more information about the default value for this setting see: https://boutell.com/newfaq/misc/urllength.html

猜你喜欢

转载自blog.csdn.net/hoddy355/article/details/85554415