Ejemplo n.º 1
0
 def __init__(self, validate=True, **kwargs):
     print("\n\n\n\nINIT CALLED\n\n\n\n")
     #proxy_kwargs = merge_dicts(Proxy.default_proxy_attrs, proxy_kwargs)
     Proxy.__init__(self, validate=validate, **kwargs)
     self.validate = validate
     for kwarg, default in self.__class__.default_detail_attrs.items():
         if kwarg in kwargs:
             default = kwargs[kwarg]
         setattr(self, kwarg, default)
     if (self.validate):
         self.do_detail_validation()
Ejemplo n.º 2
0
 def __init__(self):
     Proxy.__init__(self)
     self.start_url = 'http://api.xicidaili.com/free2016.txt'
     self.http_proxy_list = []
     self.https_proxy_list = []
     self.lock = rw_lock.RWLock()
     self.running = False
     self.random = Random()
     self.update_cycle = 5 * 60  # 20 minutes update ip pool
     self.validate_cycle = 4 * 40
     self.validate_url = 'http://www.baidu.com'
     self.persist_http = 'http_proxy.txt'
     self.persist_https = 'https_proxy.txt'
Ejemplo n.º 3
0
 def __init__(self,args):
     Proxy.__init__(self,args)
     self.server_ip = args.server_ip
     self.server_port = args.server_port
     self.dst = (self.server_ip,self.server_port)
Ejemplo n.º 4
0
 def __init__(self, subject, wnd=None):
     Proxy.__init__(self, subject)
     self.__wnd = wnd or default_window
Ejemplo n.º 5
0
 def __init__(self, address=None):
     Proxy.__init__(self, address)
     self.ipaddr = None
     self.destport = address[1]
Ejemplo n.º 6
0
	def __init__(self, to_slave, from_slave):
		Proxy.__init__(self, to_slave, from_slave)
		self.root = MasterObject(self)
		self._queue = {}	# Serial -> RequestBlocker
Ejemplo n.º 7
0
 def __init__(self, to_slave, from_slave):
     Proxy.__init__(self, to_slave, from_slave)
     self.root = MasterObject(self)
     self._queue = {}  # Serial -> RequestBlocker
Ejemplo n.º 8
0
 def __init__(self, address=None):
     Proxy.__init__(self, address)
     self.ipaddr = None
     self.destport = address[1]