Bläddra i källkod

[update] 云代理

jhao 7 år sedan
förälder
incheckning
d3dfcf8ae3
3 ändrade filer med 19 tillägg och 5 borttagningar
  1. 1 1
      Config/setting.py
  2. 5 4
      ProxyGetter/getFreeProxy.py
  3. 13 0
      ProxyHelper/__init__.py

+ 1 - 1
Config/setting.py

@@ -52,7 +52,7 @@ PROXY_GETTER = [
     "freeProxy04",
     "freeProxy05",
     "freeProxy06",
-    "freeProxyEleven",
+    "freeProxy07",
     "freeProxyTwelve",
     # foreign website, outside the wall
     # "freeProxyWallFirst",

+ 5 - 4
ProxyGetter/getFreeProxy.py

@@ -185,12 +185,13 @@ class GetFreeProxy(object):
                 yield ':'.join(tr.xpath('./td/text()')[0:2])
 
     @staticmethod
-    def freeProxyTen():
+    def freeProxy07():
         """
         云代理 http://www.ip3366.net/free/
         :return:
         """
-        urls = ['http://www.ip3366.net/free/']
+        urls = ['http://www.ip3366.net/free/?stype=1',
+                "http://www.ip3366.net/free/?stype=2"]
         request = WebRequest()
         for url in urls:
             r = request.get(url, timeout=10)
@@ -283,8 +284,8 @@ if __name__ == '__main__':
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy03)
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy04)
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy05)
-    CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy06)
-    # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxyEight)
+    # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy06)
+    CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxy07)
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxyNinth)
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxyTen)
     # CheckProxy.checkGetProxyFunc(GetFreeProxy.freeProxyEleven)

+ 13 - 0
ProxyHelper/__init__.py

@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+"""
+-------------------------------------------------
+   File Name:     __init__.py
+   Description :
+   Author :        JHao
+   date:          2019/7/11
+-------------------------------------------------
+   Change Activity:
+                   2019/7/11:
+-------------------------------------------------
+"""
+__author__ = 'JHao'