|
@@ -62,6 +62,7 @@ def process_query(qs):
|
|
|
# df=pd.DataFrame()
|
|
|
|
|
|
elmts = driver.find_elements_by_xpath("//div[@class='yuRUbf']/a")
|
|
|
+ print('網頁數量',len(elmts))
|
|
|
idx = 1
|
|
|
for elmt in elmts:
|
|
|
href=elmt.get_attribute('href')
|
|
@@ -86,7 +87,7 @@ def run_once(q):
|
|
|
options = webdriver.ChromeOptions()
|
|
|
options.add_argument('--headless')
|
|
|
options.add_argument('--remote-debugging-port=9222')
|
|
|
- options.add_experimental_option("debuggerAddress", f"127.0.0.1:{q[2]}")
|
|
|
+ options.add_experimental_option("debuggerAddress", f"127.0.0.1:{q[3]}")
|
|
|
options.add_argument("--user-agent=" +user_agent)
|
|
|
options.add_argument("--incognito")
|
|
|
|