|
@@ -71,7 +71,7 @@ def process_query(qs):
|
|
def run_once(q):
|
|
def run_once(q):
|
|
global driver
|
|
global driver
|
|
result=[]
|
|
result=[]
|
|
- # s = Service('/root/driver/chromedriver')
|
|
|
|
|
|
+ s = Service('/root/driver/chromedriver')
|
|
options = webdriver.ChromeOptions()
|
|
options = webdriver.ChromeOptions()
|
|
options.add_argument('--headless')
|
|
options.add_argument('--headless')
|
|
options.add_argument('--remote-debugging-port=9222')
|
|
options.add_argument('--remote-debugging-port=9222')
|
|
@@ -80,12 +80,12 @@ def run_once(q):
|
|
options.add_argument("--incognito")
|
|
options.add_argument("--incognito")
|
|
|
|
|
|
driver = webdriver.Chrome(
|
|
driver = webdriver.Chrome(
|
|
- options=options,executable_path='/root/driver/chromedriver')
|
|
|
|
|
|
+ options=options,service=s)
|
|
|
|
|
|
driver.delete_all_cookies()
|
|
driver.delete_all_cookies()
|
|
driver.set_window_size(1400,1000)
|
|
driver.set_window_size(1400,1000)
|
|
|
|
|
|
- print(q)
|
|
|
|
|
|
+ print('到此')
|
|
process_query(q)
|
|
process_query(q)
|
|
time.sleep(3)
|
|
time.sleep(3)
|
|
driver.quit()
|
|
driver.quit()
|