wangkun 2 anni fa
parent
commit
582460eee1
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      shipinhao/shipinhao_search/shipinhao_search.py

+ 2 - 0
shipinhao/shipinhao_search/shipinhao_search.py

@@ -244,6 +244,8 @@ class ShipinhaoSearch:
         webviews = driver.contexts
         Common.logger(log_type, crawler).info(f"webviews:{webviews}")
         for webview in webviews:
+            if webview == 'NATIVE_APP':
+                continue
             driver.switch_to.context(webview)
             time.sleep(1)
             windowHandles = driver.window_handles