|
@@ -24,11 +24,8 @@ def re_get_webdriver():
|
|
print('quit....')
|
|
print('quit....')
|
|
driver = None
|
|
driver = None
|
|
try:
|
|
try:
|
|
-<<<<<<< HEAD
|
|
|
|
s = Service('/root/driver/chromedriver102')
|
|
s = Service('/root/driver/chromedriver102')
|
|
-=======
|
|
|
|
#s = Service('/root/driver/chromedriver')
|
|
#s = Service('/root/driver/chromedriver')
|
|
->>>>>>> 74e6d014f895aed8af2d3b229efb941e56630b4b
|
|
|
|
options = webdriver.ChromeOptions()
|
|
options = webdriver.ChromeOptions()
|
|
options.add_argument("--no-sandbox")
|
|
options.add_argument("--no-sandbox")
|
|
options.add_argument("--disable-dev-shm-usage")
|
|
options.add_argument("--disable-dev-shm-usage")
|
|
@@ -47,7 +44,7 @@ def re_get_webdriver():
|
|
options.add_argument('--proxy-server=%s' % proxy)
|
|
options.add_argument('--proxy-server=%s' % proxy)
|
|
print('使用代理ip', change_ip)
|
|
print('使用代理ip', change_ip)
|
|
#driver.delete_all_cookies()
|
|
#driver.delete_all_cookies()
|
|
- driver = webdriver.Chrome(service=s, options=options)
|
|
|
|
|
|
+ driver = webdriver.Chrome(options=options,service=s)
|
|
driver.set_window_size(1400, 1000)
|
|
driver.set_window_size(1400, 1000)
|
|
except:
|
|
except:
|
|
traceback.print_exc()
|
|
traceback.print_exc()
|
|
@@ -64,6 +61,6 @@ def run_once():
|
|
print(ip_address)
|
|
print(ip_address)
|
|
driver.quit()
|
|
driver.quit()
|
|
|
|
|
|
-os.system('docker container restart tiny6')
|
|
|
|
|
|
+#os.system('docker container restart tiny6')
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
run_once()
|
|
run_once()
|