|
@@ -186,9 +186,9 @@ class ShipinhaoSearch:
|
|
"automationName": "UiAutomator2",
|
|
"automationName": "UiAutomator2",
|
|
|
|
|
|
"showChromedriverLog": True,
|
|
"showChromedriverLog": True,
|
|
-
|
|
+ "chromeOptions": {"androidProcess": "com.tencent.mm:appbrand0"},
|
|
|
|
|
|
- "chromeOptions": {"androidProcess": "com.tencent.mm"},
|
|
+
|
|
'enableWebviewDetailsCollection': True,
|
|
'enableWebviewDetailsCollection': True,
|
|
'setWebContentsDebuggingEnabled': True,
|
|
'setWebContentsDebuggingEnabled': True,
|
|
'chromedriverExecutable': chromedriverExecutable,
|
|
'chromedriverExecutable': chromedriverExecutable,
|
|
@@ -244,8 +244,8 @@ class ShipinhaoSearch:
|
|
webviews = driver.contexts
|
|
webviews = driver.contexts
|
|
Common.logger(log_type, crawler).info(f"webviews:{webviews}")
|
|
Common.logger(log_type, crawler).info(f"webviews:{webviews}")
|
|
|
|
|
|
-
|
|
+ driver.switch_to.context(webviews[1])
|
|
- driver.switch_to.context('WEBVIEW_com.tencent.mm:tools')
|
|
+
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
windowHandles = driver.window_handles
|
|
windowHandles = driver.window_handles
|
|
for handle in windowHandles:
|
|
for handle in windowHandles:
|