ip代理池bug
标题报错1:
zincrby(REDIS_KEY,proxy,-1)
redis.exceptions.ResponseError: value is not a valid float
解决方案: zincrby(REDIS_KEY,-1,proxy)
标题报错2:
zadd(REDIS_KEY, score, proxy)
redis 'int' object has no attribute 'items'
文档更新为
zadd(self, name, mapping, nx=False, xx=False, ch=False, incr=False)
Set any number of element-name, score pairs to the key ``name``. Pairs
are specified as a dict of element-names keys to score values.
解决方案
zadd(REDIS_KEY,{proxy:score})