feapder icon indicating copy to clipboard operation
feapder copied to clipboard

自定义配置里面的PROXY_EXTRACT_API无效

Open ddzyx opened this issue 3 years ago • 0 comments

1.76版本的时候发现这个问题 但忘记怎么解决了 现在1.79还遇到这个问题 在setting里面

# 设置代理

PROXY_EXTRACT_API = "http://webapi.http.zhimacangku.com/getip?num=2&type=1&pro=&city=0&yys=0&port=1&time=1&ts=0&ys=0&cs=0&lb=1&sb=0&pb=4&mr=1&regions=" # 代理提取API ,返回的代理分割符为\r\n PROXY_ENABLE = True 这里num为1

在spider文件里 自定义配置 custom_setting = dict( SPIDER_THREAD_COUNT=1, SPIDER_SLEEP_TIME=[1, 3], SPIDER_MAX_RETRY_TIMES=10, ITEM_FILTER_ENABLE=True, # item 去重 REQUEST_FILTER_ENABLE=False, # request 去重 PROXY_EXTRACT_API="http://webapi.http.zhimacangku.com/getip?num=2&type=1&pro=&city=0&yys=0&port=1&time=1&ts=0&ys=0&cs=0&lb=1&sb=0&pb=4&mr=1&regions=", PROXY_ENABLE=True ) 这里num为2

但运行代码后调用的还是setting里面的配置 num为1的结果

ddzyx avatar Sep 10 '22 14:09 ddzyx