Parcourir la source

driver option 9922

zooeytsai il y a 3 ans
Parent
commit
eae9fb88cb
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      INNNews/general_clickbot.py

+ 4 - 4
INNNews/general_clickbot.py

@@ -71,16 +71,16 @@ def process_query(qs):
 def run_once(q):
     global driver
     result=[]
-    s = Service('/root/driver/chromedriver')
+    # s = Service('/root/driver/chromedriver')
     options = webdriver.ChromeOptions()
     options.add_argument('--headless')
-    # options.add_argument('--remote-debugging-port=9222')
-    options.add_experimental_option("debuggerAddress", "192.168.192.45:9922")
+    options.add_argument('--remote-debugging-port=9222')
+    options.add_experimental_option("debuggerAddress", "192.168.192.156:9922")
 #    options.add_argument("--user-agent=" +user_agent)
     options.add_argument("--incognito")
 
     driver = webdriver.Chrome(
-    options=options,service=s)
+    options=options,executable_path='/root/driver/chromedriver')
 
     driver.delete_all_cookies()
     driver.set_window_size(1400,1000)