Code Monkey home page Code Monkey logo

Comments (4)

weidongzhou1994 avatar weidongzhou1994 commented on May 16, 2024

在哪里更改啊?只用更改db 文件吗?

from proxypool.

cxapython avatar cxapython commented on May 16, 2024

在哪里更改啊?只用更改db 文件吗?

凡是使用了zadd方法的都要改,因为api变了。

from proxypool.

DEPAPEPE1412 avatar DEPAPEPE1412 commented on May 16, 2024
def add(self, proxy, score=INITIAL_SCORE):
    """
    添加代理,设置分数为最高
    :param proxy: 代理
    :param score: 分数
    :return: 添加结果
    """
    if not re.match('\d+\.\d+\.\d+\.\d+\:\d+', proxy):
        print('代理不符合规范', proxy, '丢弃')
        return
    if not self.db.zscore(REDIS_KEY, proxy):
        dic={}
        dic[proxy] =score

        return self.db.zadd(REDIS_KEY, dic)

谢谢提醒,改了这个就没有报错了

from proxypool.

Germey avatar Germey commented on May 16, 2024

新版本修改了一些架构和 Bug,欢迎试用和提宝贵意见,谢谢!

from proxypool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.