jhao vor 5 Jahren
Ursprung
Commit
ecc5c94eb3
4 geänderte Dateien mit 26 neuen und 37 gelöschten Zeilen
  1. 14 14
      README.md
  2. 3 0
      docs/changelog.rst
  3. 6 19
      fetcher/proxyFetcher.py
  4. 3 4
      setting.py

+ 14 - 14
README.md

@@ -190,20 +190,20 @@ PROXY_FETCHER = [
 
    目前实现的采集免费代理网站有(排名不分先后, 下面仅是对其发布的免费代理情况, 付费代理测评可以参考[这里](https://zhuanlan.zhihu.com/p/33576641)): 
    
-  | 厂商名称 |  状态  |  更新速度 |  可用率  |  是否被墙  |  地址 |
-  | -----   |  ---- | --------  | ------ | --------- | ----- |
-  | 无忧代理 |  可用  | 几分钟一次 |   *     |  否       | [地址](http://www.data5u.com/free/index.html) |
-  | 66代理   | 可用  | 更新很慢   |   *     |  否      | [地址](http://www.66ip.cn/) |
-  | 西刺代理 | 可用   | 几分钟一次 |   *     | 否       | [地址](http://www.xicidaili.com)|
-  | 全网代理 |  可用  | 几分钟一次 |   *     |  否      | [地址](http://www.goubanjia.com/)|
-  | ~~训代理~~ |  已关闭免费代理  | * |   *     |  否      | [地址](http://www.xdaili.cn/)|
-  | 快代理 |  可用  |几分钟一次|   *     |  否      | [地址](https://www.kuaidaili.com/)|
-  | 云代理 |  可用  |几分钟一次|   *     |  否      | [地址](http://www.ip3366.net/)|
-  | IP海 |  可用  |几小时一次|   *     |  否      | [地址](http://www.iphai.com/)|
-  | 免费IP代理库 |  可用  |快|   *     |  否      | [地址](http://ip.jiangxianli.com/)|
-  | 中国IP地址 |  可用  |几分钟一次|   *     |  是      | [地址](http://cn-proxy.com/)|
-  | Proxy List |  可用  |几分钟一次|   *     |  是      | [地址](https://proxy-list.org/chinese/index.php)|
-  | ProxyList+ |  可用  |几分钟一次|   *     |  是      | [地址](https://list.proxylistplus.com/Fresh-HTTP-Proxy-List-1)|
+  |   代理名称   |  状态  |  更新速度 |  可用率  |  地址 |    代码   |
+  | ---------   |  ---- | --------  | ------  | ----- |   ------- |
+  | 无忧代理     |  √    |     ★     |   *    | [地址](http://www.data5u.com/) | `freeProxy01` |
+  | 66代理      |   √    |    ★★    |   *    |  [地址](http://www.66ip.cn/) |  `freeProxy02`  |
+  | ~~西刺代理~~ | ~~已关闭~~ | ~~★~~ | ~~*~~ | ~~[地址](http://www.xicidaili.com)~~| ~~`freeProxy03`~~|
+  | 全网代理     |  √    |   ★       |   *   | [地址](http://www.goubanjia.com/)| `freeProxy04` |
+  | 快代理      |  √     |   ☆       |   *   | [地址](https://www.kuaidaili.com/)| `freeProxy05` |
+  | 代理盒子    |  √     |  ★★★      |   *   | [地址](https://proxy.coderbusy.com/)| `freeProxy06` |
+  | 云代理      |  √     |  ★        |   *   | [地址](http://www.ip3366.net/)|  `freeProxy07`   |
+  | IP海       |~~已关闭~~|~~★~~     | ~~*~~ | ~~[地址](http://www.iphai.com/)~~|~~`freeProxy08`~~|
+  | 免费代理库  |  √     |   ☆       |   *   | [地址](http://ip.jiangxianli.com/)| `freeProxy09` |
+  | 89代理     |   √    |    ☆      |   *   | [地址](http://cn-proxy.com/)| `freeProxy13` |
+  | 西拉代理    |  √     |   ★★      |   *   | [地址](https://proxy-list.org/chinese/index.php)| `freeProxy14` |
+
   
   如果还有其他好的免费代理网站, 可以在提交在[issues](https://github.com/jhao104/proxy_pool/issues/71), 下次更新时会考虑在项目中支持。
 

+ 3 - 0
docs/changelog.rst

@@ -7,6 +7,9 @@ ChangeLog
 ------------------
 
 1. Fix Bug `#493`_, 新增时区配置; (2020-08-12)
+2. 修复 **66代理** 采集; (2020-11-04)
+3. 修复 **全网代理** 采集, 解决HTML端口加密问题; (2020-11-04)
+4. 新增 **代理盒子** 免费源; (2020-11-04)
 
 .. _#493: https://github.com/jhao104/proxy_pool/issues/493
 

+ 6 - 19
fetcher/proxyFetcher.py

@@ -247,24 +247,6 @@ class ProxyFetcher(object):
 
     @staticmethod
     def freeProxy13(max_page=2):
-        """
-        http://www.qydaili.com/free/?action=china&page=1
-        齐云代理
-        :param max_page:
-        :return:
-        """
-        base_url = 'http://www.qydaili.com/free/?action=china&page='
-        for page in range(1, max_page + 1):
-            url = base_url + str(page)
-            r = WebRequest().get(url, timeout=10)
-            proxies = re.findall(
-                r'<td.*?>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})</td>[\s\S]*?<td.*?>(\d+)</td>',
-                r.text)
-            for proxy in proxies:
-                yield ':'.join(proxy)
-
-    @staticmethod
-    def freeProxy14(max_page=2):
         """
         http://www.89ip.cn/index.html
         89免费代理
@@ -282,7 +264,12 @@ class ProxyFetcher(object):
                 yield ':'.join(proxy)
 
     @staticmethod
-    def freeProxy15():
+    def freeProxy14():
+        """
+        http://www.xiladaili.com/
+        西拉代理
+        :return:
+        """
         urls = ['http://www.xiladaili.com/putong/',
                 "http://www.xiladaili.com/gaoni/",
                 "http://www.xiladaili.com/http/",

+ 3 - 4
setting.py

@@ -46,17 +46,16 @@ TABLE_NAME = 'use_proxy'
 # ###### config the proxy fetch function ######
 PROXY_FETCHER = [
     "freeProxy01",
-    # "freeProxy02",
+    "freeProxy02",
     # "freeProxy03",
     "freeProxy04",
     "freeProxy05",
-    # "freeProxy06",
+    "freeProxy06",
     "freeProxy07",
     # "freeProxy08",
     "freeProxy09",
     "freeProxy13",
-    "freeProxy14",
-    "freeProxy15",
+    "freeProxy14"
 ]
 
 # ############# proxy validator #################