wangkun 2 năm trước cách đây
mục cha
commit
582460eee1
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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