def getAll_http(): proxies = ProxyManager('http').getAll() return proxies
def __init__(self, mode, queue, item_dict): ProxyManager.__init__(self, mode) Thread.__init__(self) self.log = LogHandler('proxy_check', file=False) # 多线程同时写一个日志文件会有问题 self.queue = queue self.item_dict = item_dict
def get_http(): proxy = ProxyManager('http').get_http() return proxy if proxy else 'no proxy!'
def __init__(self, mode): ProxyManager.__init__(self, mode) self.mode = mode self.queue = Queue() self.proxy_item = dict()
def __init__(self, mode): ProxyManager.__init__(self, mode) self.log = LogHandler('refresh_schedule')
def getStatus_http(): status = ProxyManager('http').getNumber() return status
def delete_https(): proxy = request.args.get('proxy') ProxyManager('https').delete(proxy) return 'success'