最新解决navigator.webdriver=true的方法
2021-03-08 00:29
标签:controls web none const class control exec val exe selenium pyppeteer 最新解决navigator.webdriver=true的方法 标签:controls web none const class control exec val exe 原文地址:https://www.cnblogs.com/rnckty/p/12879046.htmlbrowser.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
"source": """
Object.defineProperty(navigator, ‘webdriver‘, {
get: () => undefined
})
"""
})
js = ‘‘‘
()=>{
const newProto = navigator.__proto__;
delete newProto.webdriver;
navigator.__proto__ = newProto;
}
‘‘‘
await page.evaluateOnNewDocument(js)
文章标题:最新解决navigator.webdriver=true的方法
文章链接:http://soscw.com/index.php/essay/61573.html