Ejemplo n.º 1
0
def _runProxyFetch():
    proxy_queue = Queue()

    for proxy in runFetcher():
        proxy_queue.put(Proxy(proxy).to_json)

    runChecker("raw", proxy_queue)
Ejemplo n.º 2
0
def runProxyFetch():
    proxy_queue = Queue()

    for proxy in runFetcher():
        proxy_queue.put(proxy)

    runChecker("raw", proxy_queue)
Ejemplo n.º 3
0
def testMain():
    proxy_queue = Queue()
    for proxy in runFetcher():
        proxy_queue.put(proxy)

    # runChecker("raw", proxy_queue)
    checker = Checker('raw', proxy_queue, f"thread_01")
    checker.start()
    checker.join()
Ejemplo n.º 4
0
def _runProxyFetch():
    proxy_queue = Queue()
    proxy_handler = ProxyHandler()
    # 当代理池中数量小于poolSizeMin时,再抓取
    if proxy_handler.db.getCount() < proxy_handler.conf.poolSizeMin:
        for proxy in runFetcher():
            proxy_queue.put(Proxy(proxy).to_json)

        runChecker("raw", proxy_queue)
Ejemplo n.º 5
0
def _runProxyFetch():
    # proxy_queue = Queue()
    proxy_handler = ProxyHandler()
    for proxy in runFetcher():
        proxy_handler.db.put(Proxy(proxy))