V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
fate0
V2EX  ›  Python

写了个抓代理程序,维护了个代理池

  •  3
     
  •   fate0 ·
    fate0 · 2017-06-20 20:48:30 +08:00 · 4545 次点击
    这是一个创建于 2499 天前的主题,其中的信息可能已经有所发展或是发生改变。

    抓代理:

    项目地址: fate0/getproxy

    工作原理很简单,也就是去抓代理网站、过滤可用 ip、存储至文本。更多信息可以看 README.md

    代理池:

    项目地址: fate0/proxylist

    正常情况下,代理池的数据在 2000 - 3000 之间

    最后:

    欢迎各种 star、issue 以及 pr (。・`ω´・)

    15 条回复    2017-06-22 09:56:43 +08:00
    ixinshang
        1
    ixinshang  
       2017-06-20 21:06:58 +08:00 via Android
    支持,需要这种
    wwek
        2
    wwek  
       2017-06-20 21:18:36 +08:00
    支持
    mingyun
        3
    mingyun  
       2017-06-20 23:04:15 +08:00
    INFO:getproxy.getproxy:[*] Init
    INFO:getproxy.getproxy:[*] Current Ip Address: 36.102.227.142
    INFO:getproxy.getproxy:[*] Load input proxies
    INFO:getproxy.getproxy:[*] Validate input proxies
    INFO:getproxy.getproxy:[*] Load plugins
    INFO:getproxy.getproxy:[*] Grab proxies
    ERROR:getproxy.plugin.cnproxy:[-] Request page 1 error: ('Connection aborted.',
    ConnectionAbortedError(10053, '您的主机中的软件中止了一个已建立的连接。', None,
    10053, None))
    ERROR:getproxy.plugin.freeproxylist:[-] Request page 0 error: HTTPSConnectionPoo
    l(host='free-proxy-list.net', port=443): Max retries exceeded with url: / (Cause
    d by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0
    x03529A30>, 'Connection to free-proxy-list.net timed out. (connect timeout=10)')
    )
    ERROR:getproxy.plugin.proxylist:[-] Request page 1 error: HTTPConnectionPool(hos
    t='proxy-list.org', port=80): Max retries exceeded with url: /english/index.php?
    p=1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at
    0x03531730>, 'Connection to proxy-list.org timed out. (connect timeout=10)'))
    ERROR:getproxy.plugin.txt:[-] Request url http://www.proxylists.net/http_highano
    n.txt error: HTTPConnectionPool(host='www.proxylists.net', port=80): Max retries
    exceeded with url: /http_highanon.txt (Caused by ConnectTimeoutError(<urllib3.c
    onnection.HTTPConnection object at 0x035423F0>, 'Connection to www.proxylists.ne
    t timed out. (connect timeout=10)'))
    INFO:getproxy.getproxy:[*] Validate web proxies

    环境 Python3 win7
    wujunze
        4
    wujunze  
       2017-06-20 23:05:18 +08:00
    支持 已经 star
    v1024
        5
    v1024  
       2017-06-20 23:55:38 +08:00 via iPhone
    travis 看了想骂娘
    fate0
        6
    fate0  
    OP
       2017-06-21 06:46:39 +08:00
    @mingyun 那几个网站被国内墙了呗,等着看其他网站的结果就好了。
    fate0
        7
    fate0  
    OP
       2017-06-21 06:48:25 +08:00
    @v1024 拿 travis 干这事感觉挺好的,免费、方便、不被墙 =。=
    ssack9
        8
    ssack9  
       2017-06-21 07:37:43 +08:00 via iPhone
    不错啊
    Midnight
        9
    Midnight  
       2017-06-21 08:42:09 +08:00
    已 star
    tausi0661
        10
    tausi0661  
       2017-06-21 10:30:47 +08:00
    已 star
    inmyfree
        11
    inmyfree  
       2017-06-21 11:29:30 +08:00
    lz 考虑加这个不 proxydb.net
    fate0
        12
    fate0  
    OP
       2017-06-21 11:51:01 +08:00
    @inmyfree 之前也想抓这个网站,但是这个网站更新的速度是小时级的...后期可能会加上去,不过数据肯定不是全抓下来。
    openbsd
        13
    openbsd  
       2017-06-21 14:52:54 +08:00
    这个可以有
    majiawei
        14
    majiawei  
       2017-06-21 17:08:07 +08:00
    已 star,之前有些小工具需要用到代理,然后屁颠屁颠去各个代理网站手动拷贝了几个顶着用哈哈哈哈
    bozong
        15
    bozong  
       2017-06-22 09:56:43 +08:00
    我擦。牛逼
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5734 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 01:47 · PVG 09:47 · LAX 18:47 · JFK 21:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.