MCPcopy Index your code
hub / github.com/lining0806/PythonSpiderNotes / all_ticket_proxy

Function all_ticket_proxy

QunarSpider/QunarSpider.py:102–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 driver.close()
101
102def all_ticket_proxy():
103 hot_city_proxy_list = []
104 proxy_list = get_proxy_list('./proxy/proxy.txt') # ./表示当前目录,../表示上一级目录
105 for i in xrange(num):
106 hot_city_proxy_list.append(hot_city_list[i]+','+proxy_list[i])
107 pool = mp.Pool(processes=1)
108 pool.map(ticket_worker_proxy, hot_city_proxy_list) # map(f, [x1, x2, x3, x4]) = [f(x1), f(x2), f(x3), f(x4)]
109 pool.close()
110 pool.join()
111
112def ticket_worker_no_proxy(city):
113 driver = webdriver.Firefox()

Callers

nothing calls this directly

Calls 1

get_proxy_listFunction · 0.85

Tested by

no test coverage detected