(city)
| 110 | pool.join() |
| 111 | |
| 112 | def ticket_worker_no_proxy(city): |
| 113 | driver = webdriver.Firefox() |
| 114 | # chromedriver = r'C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe' |
| 115 | # os.environ['webdriver.chrome.driver'] = chromedriver |
| 116 | # driver = webdriver.Chrome(chromedriver) |
| 117 | driver.get(site) |
| 118 | driver.maximize_window() # 将浏览器最大化显示 |
| 119 | time.sleep(5) # 控制间隔时间,等待浏览器反映 |
| 120 | for i in xrange(num): |
| 121 | if city == hot_city_list[i]: |
| 122 | continue |
| 123 | from_city = city |
| 124 | to_city = hot_city_list[i] |
| 125 | one_driver_ticket(driver, from_city, to_city) |
| 126 | driver.close() |
| 127 | |
| 128 | def all_ticket_no_proxy(): |
| 129 | pool = mp.Pool(processes=1) |
nothing calls this directly
no test coverage detected