GithubHelp home page GithubHelp logo

proxypool's Introduction

自建代理池,代码参考自《python3网络爬虫实战》——崔庆才。有所改动。
运行需要搭建Flask、Redis环境
各文件说明如下:

Run——运行即可开启代理池,其中有Getter_module、Tester_module、proxyAPI_module三个模块的开关,可在代码中修改

ProxyGet_module——代理获取模块,可增加代理网站接口(封装方法需以“crawl_”开头)

Redis_module——数据库模块,包含一系列数据操作的方法

Getter_module——连接代理获取模块和数据库模块,将获取的代理存入数据库

Tester_module——代理检测模块,规则如下:获取到的代理赋初始值10分,每次用目标网址检测代理后,可用则立即赋值100分,不可用则减1分,分值小于0的代理则被移除

proxyAPI_module——API接口模块,接口地址为:http://localhost:5000/random 。每次从Redis数据库中随机抽取一条可用代理。

proxypool's People

Contributors

osinoooo avatar

Stargazers

 avatar

Watchers

James Cloos avatar

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.