()
| 100 | driver.close() |
| 101 | |
| 102 | def 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 | |
| 112 | def ticket_worker_no_proxy(city): |
| 113 | driver = webdriver.Firefox() |
nothing calls this directly
no test coverage detected