[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2321":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},2321,"proxy_pool","jhao104\u002Fproxy_pool","jhao104","Python ProxyPool for web spider","https:\u002F\u002Fjhao104.github.io\u002Fproxy_pool\u002F",null,"Python",23400,5389,435,290,0,3,18,66,17,91.6,"MIT License",false,"master",true,[27,28,29,30,31],"crawler","http","proxy","redis","spider","2026-06-12 04:00:14","\nProxyPool 爬虫代理IP池\n=======\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002Fjhao104\u002Fproxy_pool.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Fjhao104\u002Fproxy_pool)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPowered%20by-@j_hao104-green.svg)](http:\u002F\u002Fwww.spiderpy.cn\u002Fblog\u002F)\n[![Packagist](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fl\u002Fdoctrine\u002Form.svg)](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fblob\u002Fmaster\u002FLICENSE)\n[![GitHub contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fjhao104\u002Fproxy_pool.svg)](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fgraphs\u002Fcontributors)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-Python-green.svg)](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool)\n\n    ______                        ______             _\n    | ___ \\_                      | ___ \\           | |\n    | |_\u002F \u002F \\__ __   __  _ __   _ | |_\u002F \u002F___   ___  | |\n    |  __\u002F|  _\u002F\u002F _ \\ \\ \\\u002F \u002F| | | ||  __\u002F\u002F _ \\ \u002F _ \\ | |\n    | |   | | | (_) | >  \u003C \\ |_| || |  | (_) | (_) || |___\n    \\_|   |_|  \\___\u002F \u002F_\u002F\\_\\ \\__  |\\_|   \\___\u002F \\___\u002F \\_____\\\n                           __ \u002F \u002F\n                          \u002F___ \u002F\n\n### ProxyPool\n\n爬虫代理IP池项目,主要功能为定时采集网上发布的免费代理验证入库，定时验证入库的代理保证代理的可用性，提供API和CLI两种使用方式。同时你也可以扩展代理源以增加代理池IP的质量和数量。\n\n* 文档: [document](https:\u002F\u002Fproxy-pool.readthedocs.io\u002Fzh\u002Flatest\u002F) [![Documentation Status](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fproxy-pool\u002Fbadge\u002F?version=latest)](https:\u002F\u002Fproxy-pool.readthedocs.io\u002Fzh\u002Flatest\u002F?badge=latest)\n\n* 支持版本: [![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-2.7-green.svg)](https:\u002F\u002Fdocs.python.org\u002F2.7\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.5-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.5\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.6-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.6\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.7-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.7\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.8-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.8\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.9-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.9\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.10-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.10\u002F)\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11-blue.svg)](https:\u002F\u002Fdocs.python.org\u002F3.11\u002F)\n\n* 测试地址: http:\u002F\u002Fdemo.spiderpy.cn (勿压谢谢)\n\n* 付费代理推荐: [亮数据 Bright Data](https:\u002F\u002Fget.brightdata.com\u002Fgithub_jh)（前身 Luminati）.全球代理与网络抓取行业头部领导者。覆盖 195+ 国家的 1.5亿+ 真人住宅IP，亲测成功率极高，轻松突破反爬封锁。需要高质量代理IP的可以注册后联系中文客服。[申请免费试用](https:\u002F\u002Fget.brightdata.com\u002Fgithub_jh) (PS:用不明白的同学可以参考这个[使用教程](https:\u002F\u002Fwww.cnblogs.com\u002Fjhao\u002Fp\u002F15611785.html))。\n\n&emsp;&emsp; 想自建爬虫？接入 [Bright Data MCP Server](https:\u002F\u002Fget.brightdata.com\u002Fcd3yy5)，让 Claude、Cursor、Windsurf 等 AI 助手直接实时抓取网页——自动破解验证码、绕过地区限制。[Scraper Studio](https:\u002F\u002Fget.brightdata.com\u002Fcd3yy5) 支持 AI 一键生成或 JS 代码定制，全托管基础设施运行，无需自购代理、无需搭服务器，分钟级上线。所有产品底层均由同一套顶级代理网络驱动。\n\n&emsp;&emsp; API 产品现享7折 + 免费试用额度，注册后可联系中文客服快速上手。(用不明白的同学可参考使用教程，或注册后直接使用互动 AI 智能助手)\n👉 [https:\u002F\u002Fget.brightdata.com\u002Fcd3yy5](https:\u002F\u002Fget.brightdata.com\u002Fcd3yy5)\n\n\n### 运行项目\n\n##### 下载代码:\n\n* git clone\n\n```bash\ngit clone git@github.com:jhao104\u002Fproxy_pool.git\n```\n\n* releases\n\n```bash\nhttps:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Freleases 下载对应zip文件\n```\n\n##### 安装依赖:\n\n```bash\npip install -r requirements.txt\n```\n\n##### 更新配置:\n\n\n```python\n# setting.py 为项目配置文件\n\n# 配置API服务\n\nHOST = \"0.0.0.0\"               # IP\nPORT = 5000                    # 监听端口\n\n\n# 配置数据库\n\nDB_CONN = 'redis:\u002F\u002F:pwd@127.0.0.1:8888\u002F0'\n\n\n# 配置 ProxyFetcher\n\nPROXY_FETCHER = [\n    \"freeProxy01\",      # 这里是启用的代理抓取方法名，所有fetch方法位于fetcher\u002FproxyFetcher.py\n    \"freeProxy02\",\n    # ....\n]\n```\n\n#### 启动项目:\n\n```bash\n# 如果已经具备运行条件, 可用通过proxyPool.py启动。\n# 程序分为: schedule 调度程序 和 server Api服务\n\n# 启动调度程序\npython proxyPool.py schedule\n\n# 启动webApi服务\npython proxyPool.py server\n\n```\n\n### Docker Image\n\n```bash\ndocker pull jhao104\u002Fproxy_pool\n\ndocker run --env DB_CONN=redis:\u002F\u002F:password@ip:port\u002F0 -p 5010:5010 jhao104\u002Fproxy_pool:latest\n```\n### docker-compose\n\n项目目录下运行: \n``` bash\ndocker-compose up -d\n```\n\n### 使用\n\n* Api\n\n启动web服务后, 默认配置下会开启 http:\u002F\u002F127.0.0.1:5010 的api接口服务:\n\n| api | method | Description | params|\n| ----| ---- | ---- | ----|\n| \u002F | GET | api介绍 | None |\n| \u002Fget | GET | 随机获取一个代理| 可选参数: `?type=https` 过滤支持https的代理|\n| \u002Fpop | GET | 获取并删除一个代理| 可选参数: `?type=https` 过滤支持https的代理|\n| \u002Fall | GET | 获取所有代理 |可选参数: `?type=https` 过滤支持https的代理|\n| \u002Fcount | GET | 查看代理数量 |None|\n| \u002Fdelete | GET | 删除代理  |`?proxy=host:ip`|\n\n\n* 爬虫使用\n\n　　如果要在爬虫代码中使用的话， 可以将此api封装成函数直接使用，例如：\n\n```python\nimport requests\n\ndef get_proxy():\n    return requests.get(\"http:\u002F\u002F127.0.0.1:5010\u002Fget\u002F\").json()\n\ndef delete_proxy(proxy):\n    requests.get(\"http:\u002F\u002F127.0.0.1:5010\u002Fdelete\u002F?proxy={}\".format(proxy))\n\n# your spider code\n\ndef getHtml():\n    # ....\n    retry_count = 5\n    proxy = get_proxy().get(\"proxy\")\n    while retry_count > 0:\n        try:\n            html = requests.get('http:\u002F\u002Fwww.example.com', proxies={\"http\": \"http:\u002F\u002F{}\".format(proxy)})\n            # 使用代理访问\n            return html\n        except Exception:\n            retry_count -= 1\n    # 删除代理池中代理\n    delete_proxy(proxy)\n    return None\n```\n\n### 扩展代理\n\n　　项目默认包含几个免费的代理获取源，但是免费的毕竟质量有限，所以如果直接运行可能拿到的代理质量不理想。所以，提供了代理获取的扩展方法。\n\n　　添加一个新的代理源方法如下:\n\n* 1、首先在[ProxyFetcher](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fblob\u002F1a3666283806a22ef287fba1a8efab7b94e94bac\u002Ffetcher\u002FproxyFetcher.py#L21)类中添加自定义的获取代理的静态方法，\n该方法需要以生成器(yield)形式返回`host:ip`格式的代理，例如:\n\n```python\n\nclass ProxyFetcher(object):\n    # ....\n\n    # 自定义代理源获取方法\n    @staticmethod\n    def freeProxyCustom1():  # 命名不和已有重复即可\n\n        # 通过某网站或者某接口或某数据库获取代理\n        # 假设你已经拿到了一个代理列表\n        proxies = [\"x.x.x.x:3128\", \"x.x.x.x:80\"]\n        for proxy in proxies:\n            yield proxy\n        # 确保每个proxy都是 host:ip正确的格式返回\n```\n\n* 2、添加好方法后，修改[setting.py](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fblob\u002F1a3666283806a22ef287fba1a8efab7b94e94bac\u002Fsetting.py#L47)文件中的`PROXY_FETCHER`项：\n\n　　在`PROXY_FETCHER`下添加自定义方法的名字:\n\n```python\nPROXY_FETCHER = [\n    \"freeProxy01\",    \n    \"freeProxy02\",\n    # ....\n    \"freeProxyCustom1\"  #  # 确保名字和你添加方法名字一致\n]\n```\n\n\n　　`schedule` 进程会每隔一段时间抓取一次代理，下次抓取时会自动识别调用你定义的方法。\n\n### 免费代理源\n\n   目前实现的采集免费代理网站有(排名不分先后, 下面仅是对其发布的免费代理情况, 付费代理测评可以参考[这里](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F33576641)): \n   \n  | 代理名称          |  状态  |  更新速度 |  可用率  |  地址 | 代码                                             |\n  |---------------|  ---- | --------  | ------  | ----- |------------------------------------------------|\n  | 66代理          |  ✔    |     ★     |   *     | [地址](http:\u002F\u002Fwww.66ip.cn\u002F)         | [`freeProxy02`](\u002Ffetcher\u002FproxyFetcher.py#L50)  |\n  | 开心代理          |   ✔   |     ★     |   *     | [地址](http:\u002F\u002Fwww.kxdaili.com\u002F)     | [`freeProxy03`](\u002Ffetcher\u002FproxyFetcher.py#L63)  |\n  | FreeProxyList |   ✔  |    ★     |   *    | [地址](https:\u002F\u002Fwww.freeproxylists.net\u002Fzh\u002F) | [`freeProxy04`](\u002Ffetcher\u002FproxyFetcher.py#L74)  |\n  | 快代理           |  ✔    |     ★     |   *     | [地址](https:\u002F\u002Fwww.kuaidaili.com\u002F)  | [`freeProxy05`](\u002Ffetcher\u002FproxyFetcher.py#L92)  |\n  | 冰凌代理          |  ✔    |    ★★★    |   *     | [地址](https:\u002F\u002Fwww.binglx.cn\u002F) | [`freeProxy06`](\u002Ffetcher\u002FproxyFetcher.py#L111) |\n  | 云代理           |  ✔    |    ★     |   *     | [地址](http:\u002F\u002Fwww.ip3366.net\u002F)      | [`freeProxy07`](\u002Ffetcher\u002FproxyFetcher.py#L123) |\n  | 小幻代理          |  ✔    |    ★★    |    *    | [地址](https:\u002F\u002Fip.ihuan.me\u002F)        | [`freeProxy08`](\u002Ffetcher\u002FproxyFetcher.py#L133) |\n  | 免费代理库         |  ✔    |     ☆     |    *    | [地址](http:\u002F\u002Fip.jiangxianli.com\u002F)   | [`freeProxy09`](\u002Ffetcher\u002FproxyFetcher.py#L143) |\n  | 89代理          |  ✔    |     ☆     |   *     | [地址](https:\u002F\u002Fwww.89ip.cn\u002F)         | [`freeProxy10`](\u002Ffetcher\u002FproxyFetcher.py#L154) |\n  | 稻壳代理          |  ✔    |     ★★    |   ***   | [地址](https:\u002F\u002Fwww.docip.ne)         | [`freeProxy11`](\u002Ffetcher\u002FproxyFetcher.py#L164) |\n\n  \n  如果还有其他好的免费代理网站, 可以在提交在[issues](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fissues\u002F71), 下次更新时会考虑在项目中支持。\n\n### 问题反馈\n\n　　任何问题欢迎在[Issues](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fissues) 中反馈，同时也可以到我的[博客](http:\u002F\u002Fwww.spiderpy.cn\u002Fblog\u002Fmessage)中留言。\n\n　　你的反馈会让此项目变得更加完美。\n\n### 贡献代码\n\n　　本项目仅作为基本的通用的代理池架构，不接收特有功能(当然,不限于特别好的idea)。\n\n　　本项目依然不够完善，如果发现bug或有新的功能添加，请在[Issues](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fissues)中提交bug(或新功能)描述，我会尽力改进，使她更加完美。\n\n　　这里感谢以下contributor的无私奉献：\n\n　　[@kangnwh](https:\u002F\u002Fgithub.com\u002Fkangnwh) | [@bobobo80](https:\u002F\u002Fgithub.com\u002Fbobobo80) | [@halleywj](https:\u002F\u002Fgithub.com\u002Fhalleywj) | [@newlyedward](https:\u002F\u002Fgithub.com\u002Fnewlyedward) | [@wang-ye](https:\u002F\u002Fgithub.com\u002Fwang-ye) | [@gladmo](https:\u002F\u002Fgithub.com\u002Fgladmo) | [@bernieyangmh](https:\u002F\u002Fgithub.com\u002Fbernieyangmh) | [@PythonYXY](https:\u002F\u002Fgithub.com\u002FPythonYXY) | [@zuijiawoniu](https:\u002F\u002Fgithub.com\u002Fzuijiawoniu) | [@netAir](https:\u002F\u002Fgithub.com\u002FnetAir) | [@scil](https:\u002F\u002Fgithub.com\u002Fscil) | [@tangrela](https:\u002F\u002Fgithub.com\u002Ftangrela) | [@highroom](https:\u002F\u002Fgithub.com\u002Fhighroom) | [@luocaodan](https:\u002F\u002Fgithub.com\u002Fluocaodan) | [@vc5](https:\u002F\u002Fgithub.com\u002Fvc5) | [@1again](https:\u002F\u002Fgithub.com\u002F1again) | [@obaiyan](https:\u002F\u002Fgithub.com\u002Fobaiyan) | [@zsbh](https:\u002F\u002Fgithub.com\u002Fzsbh) | [@jiannanya](https:\u002F\u002Fgithub.com\u002Fjiannanya) | [@Jerry12228](https:\u002F\u002Fgithub.com\u002FJerry12228)\n\n\n### Release Notes\n\n   [changelog](https:\u002F\u002Fgithub.com\u002Fjhao104\u002Fproxy_pool\u002Fblob\u002Fmaster\u002Fdocs\u002Fchangelog.rst)\n\n\u003Ca href=\"https:\u002F\u002Fhellogithub.com\u002Frepository\u002F92a066e658d147cc8bd8397a1cb88183\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fapi.hellogithub.com\u002Fv1\u002Fwidgets\u002Frecommend.svg?rid=92a066e658d147cc8bd8397a1cb88183&claim_uid=DR60NequsjP54Lc\" alt=\"Featured｜HelloGitHub\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" \u002F>\u003C\u002Fa>\n","ProxyPool 是一个用于网络爬虫的代理IP池项目，主要功能包括定时从互联网上采集免费代理并验证其有效性后入库，以及定期验证已入库代理以确保其可用性。该项目支持通过API和命令行界面两种方式进行访问，并允许用户扩展代理来源以提高代理池的质量与数量。采用Python语言编写，并利用Redis作为存储介质。适用于需要频繁更换IP地址以避免被目标网站封锁的爬虫场景中。",2,"2026-06-11 02:49:28","top_language"]