wangkun 2 年之前
父節點
當前提交
582460eee1
共有 1 個文件被更改,包括 2 次插入0 次删除
  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