GithubHelp home page GithubHelp logo

wenchasec / nb_proxypool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ydf0509/nb_proxypool

0.0 0.0 0.0 72 KB

nb_proxypool代理池power by funboost,抓取20+免费代理网站,实时维护网站更新

Python 100.00%

nb_proxypool's Introduction

1 nb_proxypool

nb_proxypool 代理池power by funboost

2 运行方式

2.0 安装依赖

使用了boost_sipder里面的请求类

pip install boost_spider

boost_spider会自动安装funboost.

2.1 配置redis账号

拉取代码,修改funboost_config.py配置文件的redis的账号密码

img.png

2.2 运行代理自动抓取和超高速并发检测生成redis代理池

点击运行 run_get_and_check_proxy.py

3 nb_proxypool 代码写法说明

nb_proxypool采用的是funboost框架驱动函数并发和定时,如果想弄清楚用法,用户需要阅读分布式函数万能框架funboost文档

https://funboost.readthedocs.io/zh/latest/

4使用redis中的代理ip方式

直接使用 proxy_request_client.py 中的 ProxyClient 发请求就好了,该类的方法名和入参和requests 100%一致,兼容性极好.

下面代码表示 按照 不使用代理和使用free代理池的请求顺序来请求百度,最大重试轮流请求4次

ProxyClient(proxy_name_list=[
        ProxyClient.PROXY_FREE, ProxyClient.PROXY_NOPROXY],request_retry_times=4).get('https://www.baidu.com')

用户也可以自己使用requests从redis中获取代理,不使用ProxyClient类.

nb_proxypool's People

Contributors

ydf0509 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.