推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
aladdindingding
V2EX  ›  Python

scrapy 项目中怎么获取代理 IP 呢

  •  
  •   aladdindingding · Jun 17, 2020 · 2604 views
    This topic created in 2294 days ago, the information mentioned may be changed or developed.

    大佬们好,是这样的,目前的代码中有一个固定的列表 ip 池作为代理 ip,每隔一段时间需要手动去更换,我想要实现一个动态去获取批量 ip,获取的地址已经有了 API 的接口,想要在 scrapy 项目代码中增加这个功能,不用数据库这样的怎么操作呢

    6 replies  •  2020-06-18 09:20:35 +08:00
    scukmh
        1
    scukmh  
       Jun 17, 2020
    Latin
        2
    Latin  
       Jun 17, 2020
    自己写中间件鸭
    jiaxin1121
        3
    jiaxin1121  
       Jun 17, 2020
    公开代理池基本没法用。
    renmu123
        4
    renmu123  
       Jun 17, 2020 via Android
    github 找个维护 ip 池的库,应该有挺多的
    aladdindingding
        5
    aladdindingding  
    OP
       Jun 17, 2020
    @renmu123 买了 api 链接的 可以提取 IP 的 就是不知道怎么在 scrapy 开启一个线程去维护一个实时可用的 IP 池
    1018ji
        6
    1018ji  
       Jun 18, 2020
    ip 隧道吧
    简单
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1089 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:20 · PVG 07:20 · LAX 16:20 · JFK 19:20
    ♥ Do have faith in what you're doing.