MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _patch_nodriver_runtime

Function _patch_nodriver_runtime

src/services/browser_captcha_personal.py:987–999  ·  view source on GitHub ↗

给 nodriver 当前浏览器实例补一层断连降噪与异常透传。

(browser_instance=None)

Source from the content-addressed store, hash-verified

985
986
987def _patch_nodriver_runtime(browser_instance=None):
988 """给 nodriver 当前浏览器实例补一层断连降噪与异常透传。"""
989 global _NODRIVER_RUNTIME_PATCHED
990
991 if not NODRIVER_AVAILABLE or uc is None:
992 return
993
994 if browser_instance is not None:
995 _patch_nodriver_browser_instance(browser_instance)
996
997 if not _NODRIVER_RUNTIME_PATCHED:
998 _NODRIVER_RUNTIME_PATCHED = True
999 debug_logger.log_info("[BrowserCaptcha] 已启用 nodriver 运行态安全补丁")
1000
1001
1002def _parse_proxy_url(proxy_url: str):

Callers 1

initializeMethod · 0.85

Calls 2

log_infoMethod · 0.80

Tested by

no test coverage detected