wangkun 1 rok pred
rodič
commit
582460eee1

+ 2 - 0
shipinhao/shipinhao_search/shipinhao_search.py

@@ -244,6 +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}")
         for webview in webviews:
         for webview in webviews:
+            if webview == 'NATIVE_APP':
+                continue
             driver.switch_to.context(webview)
             driver.switch_to.context(webview)
             time.sleep(1)
             time.sleep(1)
             windowHandles = driver.window_handles
             windowHandles = driver.window_handles