Update __init__.py

This commit is contained in:
Leon 2020-09-13 11:36:47 +02:00 committed by GitHub
parent b7685af668
commit 4c5ecc8f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,7 @@ TARGET_VERSION = 0
class Chrome:
def __new__(cls, *args, **kwargs):
def __new__(cls, *args, enable_console_log=False, **kwargs):
if not ChromeDriverManager.installed:
ChromeDriverManager(*args, **kwargs).install()
@ -63,8 +63,10 @@ class Chrome:
? target[key].bind(target)
: target[key]
})
})
});
"""
+ "console.dir = console.log = function(){};"
if not enable_console_log else ''
},
)
original_user_agent_string = instance.execute_script(