wangkun hace 1 año
padre
commit
39dd04cc9b
Se han modificado 1 ficheros con 8 adiciones y 8 borrados
  1. 8 8
      shipinhao/shipinhao_search/shipinhao_search.py

+ 8 - 8
shipinhao/shipinhao_search/shipinhao_search.py

@@ -187,8 +187,8 @@ class ShipinhaoSearch:
             # 其中 Appium、UiAutomator2、Selendroid、Espresso 用于 Android,XCUITest 用于 iOS
             "showChromedriverLog": True,
             # "chromeOptions": {"androidProcess": "com.tencent.mm:appbrand0"},
-            # "chromeOptions": {"androidProcess": "com.tencent.mm:tools"},
-            "chromeOptions": {"androidProcess": "com.tencent.mm:toolsmp"},
+            "chromeOptions": {"androidProcess": "com.tencent.mm:tools"},
+            # "chromeOptions": {"androidProcess": "com.tencent.mm:toolsmp"},
             # "chromeOptions": {"androidProcess": "com.tencent.mm"},
             'enableWebviewDetailsCollection': True,
             'setWebContentsDebuggingEnabled': True,
@@ -549,16 +549,16 @@ class ShipinhaoSearch:
         driver.implicitly_wait(10)
         Common.logger(log_type, crawler).info("点击搜索框")
         Common.logging(log_type, crawler, env, "点击搜索框")
-        # driver.find_element(By.ID, 'com.tencent.mm:id/j5t').click()  # 微信8.0.30版本
-        driver.find_element(By.ID, 'com.tencent.mm:id/he6').click()  # 微信8.0.16版本
+        driver.find_element(By.ID, 'com.tencent.mm:id/j5t').click()  # 微信8.0.30版本
+        # driver.find_element(By.ID, 'com.tencent.mm:id/he6').click()  # 微信8.0.16版本
         time.sleep(0.5)
-        # driver.find_element(By.ID, 'com.tencent.mm:id/cd7').clear().send_keys(word)  # 微信8.0.30版本
-        driver.find_element(By.ID, 'com.tencent.mm:id/bxz').clear().send_keys(word)  # 微信8.0.16版本
+        driver.find_element(By.ID, 'com.tencent.mm:id/cd7').clear().send_keys(word)  # 微信8.0.30版本
+        # driver.find_element(By.ID, 'com.tencent.mm:id/bxz').clear().send_keys(word)  # 微信8.0.16版本
         driver.press_keycode(AndroidKey.ENTER)
         Common.logger(log_type, crawler).info("进入搜索词页面")
         Common.logging(log_type, crawler, env, "进入搜索词页面")
-        # driver.find_elements(By.ID, 'com.tencent.mm:id/br8')[0].click()  # 微信8.0.30版本
-        driver.find_elements(By.ID, 'com.tencent.mm:id/jkg')[0].click()  # 微信8.0.16版本
+        driver.find_elements(By.ID, 'com.tencent.mm:id/br8')[0].click()  # 微信8.0.30版本
+        # driver.find_elements(By.ID, 'com.tencent.mm:id/jkg')[0].click()  # 微信8.0.16版本
         time.sleep(5)
 
         # 切换到微信搜索结果页 webview