mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
feat: stealth option in config
This commit is contained in:
parent
a0b09410b3
commit
039ea71678
6
main.py
6
main.py
@ -29,7 +29,11 @@ def main():
|
||||
server_address=config["MAIN"]["provider_server_address"],
|
||||
is_local=config.getboolean('MAIN', 'is_local'))
|
||||
|
||||
browser = Browser(create_driver(headless=config.getboolean('MAIN', 'headless_browser')))
|
||||
stealth_mode = config.getboolean('BROWSER', 'stealth_mode')
|
||||
browser = Browser(
|
||||
create_driver(headless=config.getboolean('BROWSER', 'headless_browser'), stealth_mode=stealth_mode),
|
||||
anticaptcha_manual_install=stealth_mode
|
||||
)
|
||||
personality_folder = "jarvis" if config.getboolean('MAIN', 'jarvis_personality') else "base"
|
||||
|
||||
agents = [
|
||||
|
@ -65,10 +65,12 @@ def create_driver(headless=False, stealth_mode=True) -> webdriver.Chrome:
|
||||
chrome_options.add_argument("--mute-audio")
|
||||
chrome_options.add_argument("--disable-notifications")
|
||||
chrome_options.add_argument('--window-size=1080,560')
|
||||
try:
|
||||
chrome_options.add_extension("./crx/nopecha.crx")
|
||||
except Exception as e:
|
||||
print(f"Failed to load AntiCaptcha extension: {str(e)}")
|
||||
if not stealth_mode:
|
||||
# crx file can't be installed in stealth mode
|
||||
crx_path = "./crx/nopecha.crx"
|
||||
if not os.path.exists(crx_path):
|
||||
raise FileNotFoundError(f"Extension file not found at: {crx_path}")
|
||||
chrome_options.add_extension(crx_path)
|
||||
|
||||
chromedriver_path = shutil.which("chromedriver")
|
||||
if not chromedriver_path:
|
||||
|
Loading…
x
Reference in New Issue
Block a user