Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,20 @@ class MyProxyFetcher(BaseFetcher):

目前实现的采集免费代理网站有(排名不分先后, 下面仅是对其发布的免费代理情况, 付费代理测评可以参考[这里](https://zhuanlan.zhihu.com/p/33576641)):

| 代理名称 | 状态 | 更新速度 | 可用率 | 地址 | 代码 |
|---------------| ---- | -------- | ------ | ----- |------------------------------------------------|
| 66代理 | ✔ | ★ | * | [地址](http://www.66ip.cn/) | [`ip66.py`](/fetcher/sources/ip66.py) |
| 开心代理 | ✔ | ★ | * | [地址](http://www.kxdaili.com/) | [`kxdaili.py`](/fetcher/sources/kxdaili.py) |
| 快代理 | ✔ | ★ | * | [地址](https://www.kuaidaili.com/) | [`kuaidaili.py`](/fetcher/sources/kuaidaili.py) |
| 云代理 | ✔ | ★ | * | [地址](http://www.ip3366.net/) | [`ip3366.py`](/fetcher/sources/ip3366.py) |
| 小幻代理 | ✔ | ★★ | * | [地址](https://ip.ihuan.me/) | [`ihuan.py`](/fetcher/sources/ihuan.py) |
| 免费代理库 | ✔ | ☆ | * | [地址](http://ip.jiangxianli.com/) | [`jiangxianli.py`](/fetcher/sources/jiangxianli.py) |
| 89代理 | ✔ | ☆ | * | [地址](https://www.89ip.cn/) | [`ip89.py`](/fetcher/sources/ip89.py) |
| 稻壳代理 | ✔ | ★★ | *** | [地址](https://www.docip.ne) | [`docip.py`](/fetcher/sources/docip.py) |
| 谷德代理 | ✔ | ★★ | *** | [地址](https://www.goodips.com) | [`goodips.py`](/fetcher/sources/goodips.py) |
| Proxifly | ✔ | ★★ | ** | [地址](https://proxifly.dev) | [`proxifly.py`](/fetcher/sources/proxifly.py) |
| 代理名称 | 状态 | 更新速度 | 可用率 | 地址 | 代码 |
|-------------| ---- | -------- |----|----------------------------------|-----------------------------------------------------|
| 开心代理 | ✔ | ★ | * | [地址](http://www.kxdaili.com/) | [`kxdaili.py`](/fetcher/sources/kxdaili.py) |
| 快代理 | ✔ | ★ | * | [地址](https://www.kuaidaili.com/) | [`kuaidaili.py`](/fetcher/sources/kuaidaili.py) |
| 云代理 | ✔ | ★ | * | [地址](http://www.ip3366.net/) | [`ip3366.py`](/fetcher/sources/ip3366.py) |
| 小幻代理 | ✔ | ★ | * | [地址](https://ip.ihuan.me/) | [`ihuan.py`](/fetcher/sources/ihuan.py) |
| 免费代理库 | ✔ | ☆ | * | [地址](http://ip.jiangxianli.com/) | [`jiangxianli.py`](/fetcher/sources/jiangxianli.py) |
| 89代理 | ✔ | ☆ | * | [地址](https://www.89ip.cn/) | [`ip89.py`](/fetcher/sources/ip89.py) |
| 稻壳代理 | ✔ | ★★ | *** | [地址](https://www.docip.ne) | [`docip.py`](/fetcher/sources/docip.py) |
| 谷德代理 | ✔ | ★★ | *** | [地址](https://www.goodips.com) | [`goodips.py`](/fetcher/sources/goodips.py) |
| 66代理 | ✔ | ★★ | * | [地址](https://www.66daili.com) | [`daili66.py`](/fetcher/sources/daili66.py) |
| Proxifly | ✔ | ★★ | ** | [地址](https://proxifly.dev) | [`proxifly.py`](/fetcher/sources/proxifly.py) |
| FreeVPNNode | ✔ | ★★ | * | [地址](https://cn.freevpnnode.com) | [`freevpnnode.py`](/fetcher/sources/freevpnnode.py) |
| Geonode | ✔ | ★★ | ** | [地址](https://geonode.com) | [`geonode.py`](/fetcher/sources/geonode.py) |


如果还有其他好的免费代理网站, 可以在提交在[issues](https://github.com/jhao104/proxy_pool/issues/71), 下次更新时会考虑在项目中支持。
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- 新增 `proxyPool.py fetcher` 命令查看启用的代理源
8. 新增代理源 **Proxifly**; (2026-06-01)
9. 移除失效代理源 **FreeProxyList**; (2026-06-02)
10. 新增代理源 **66代理 (daili66)**; (2026-06-08)
11. 移除失效代理源 **66代理 (ip66)**; (2026-06-08)


## 2.4.2 (2024-01-18)
Expand Down
1 change: 0 additions & 1 deletion docs/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ proxy_pool/
│ ├── baseFetcher.py # BaseFetcher 基类(共享解析方法)
│ └── sources/ # 各代理源独立文件
│ ├── zdaye.py # 站大爷
│ ├── ip66.py # 代理66
│ ├── kxdaili.py # 开心代理
│ ├── kuaidaili.py # 快代理
│ ├── geonode.py # Geonode
Expand Down
42 changes: 42 additions & 0 deletions fetcher/sources/daili66.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: daili66.py
Description : 66代理
Author : JHao
date: 2026/06/08
-------------------------------------------------
Change Activity:
2026/06/08:
-------------------------------------------------
"""
__author__ = 'JHao'

from fetcher.baseFetcher import BaseFetcher
from handler.logHandler import LogHandler
from util.webRequest import WebRequest

logger = LogHandler("fetcher")

class DaiLi66Fetcher(BaseFetcher):
"""66代理 https://www.66daili.com"""

name = "daili66"
url = "https://www.66daili.com"

enabled = True

def fetch(self):
url = "http://api.66daili.com/?format=json"
r = WebRequest().get(url, timeout=10)
try:
for each in r.json.get("data", []):
yield "%s:%s" % (each["ip"], each["port"])
except Exception as e:
logger.error("ProxyFetch - daili66: %s" % e)



if __name__ == '__main__':
for proxy in DaiLi66Fetcher().fetch():
print(proxy)
4 changes: 2 additions & 2 deletions fetcher/sources/freevpnnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@


class FreeVPNNodeFetcher(BaseFetcher):
"""FreeVPNNode https://cn.freevpnnode.com/free-proxy/"""
"""FreeVPNNode https://cn.freevpnnode.com"""

name = "freevpnnode"
url = "https://cn.freevpnnode.com/free-proxy/"
url = "https://cn.freevpnnode.com"

def fetch(self):
url = "https://cn.freevpnnode.com/free-proxy/"
Expand Down
37 changes: 0 additions & 37 deletions fetcher/sources/ip66.py

This file was deleted.

41 changes: 25 additions & 16 deletions tests/unit/test_fetcher_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class TestFetcherInterface(object):
"""所有 fetcher 的接口约定"""

FETCHER_CLASSES = [
("fetcher.sources.ip66", "Ip66Fetcher"),
("fetcher.sources.kxdaili", "KxdailiFetcher"),
("fetcher.sources.ip3366", "Ip3366Fetcher"),
("fetcher.sources.jiangxianli", "JiangxianliFetcher"),
Expand All @@ -70,6 +69,7 @@ class TestFetcherInterface(object):
("fetcher.sources.zdaye", "ZdayeFetcher"),
("fetcher.sources.ihuan", "IhuanFetcher"),
("fetcher.sources.proxifly", "ProxiFlyFetcher"),
("fetcher.sources.daili66", "DaiLi66Fetcher"),
]

def test_all_fetchers_have_name_url_enabled(self):
Expand All @@ -95,21 +95,6 @@ def test_all_fetchers_have_fetch_method(self):

# --------------- 各 fetcher 逻辑测试 ---------------

class TestIp66Fetcher(object):

@patch("fetcher.sources.ip66.WebRequest")
def test_fetch(self, mock_wr):
from fetcher.sources.ip66 import Ip66Fetcher
# ip66 使用 (//table)[3] 取第3个table,if i > 0 跳过第一行
html = ("<table></table><table></table>"
+ _html_table([("IP", "Port"), ("1.2.3.4", "8080"), ("5.6.7.8", "3128")]))
tree = etree.HTML(html)
mock_wr.return_value.get.return_value = _make_response(tree=tree)
result = list(Ip66Fetcher().fetch())
assert "1.2.3.4:8080" in result
assert "5.6.7.8:3128" in result


class TestKxdailiFetcher(object):

@patch("fetcher.sources.kxdaili.WebRequest")
Expand Down Expand Up @@ -386,3 +371,27 @@ def test_fetch_filters_non_http(self, mock_wr):
result = list(ProxiFlyFetcher().fetch())
assert "1.2.3.4:8080" in result
assert "9.9.9.9:8080" not in result


class TestDaiLi66Fetcher(object):

@patch("fetcher.sources.daili66.WebRequest")
def test_fetch(self, mock_wr):
from fetcher.sources.daili66 import DaiLi66Fetcher
json_data = {
"data": [
{"ip": "1.2.3.4", "port": "8080"},
{"ip": "5.6.7.8", "port": "3128"},
]
}
mock_wr.return_value.get.return_value = _make_response(json_data=json_data)
result = list(DaiLi66Fetcher().fetch())
assert "1.2.3.4:8080" in result
assert "5.6.7.8:3128" in result

@patch("fetcher.sources.daili66.WebRequest")
def test_fetch_empty_data_returns_empty(self, mock_wr):
from fetcher.sources.daili66 import DaiLi66Fetcher
mock_wr.return_value.get.return_value = _make_response(json_data={})
result = list(DaiLi66Fetcher().fetch())
assert result == []
Loading