fix: add root Chromium-Gost path candidate and safe console error encoding
This commit is contained in:
@ -39,7 +39,9 @@ def find_gost_browser_executable() -> Optional[str]:
|
||||
|
||||
candidates = [
|
||||
# Chromium-Gost (AppData / Program Files)
|
||||
os.path.join(local_app_data, "Chromium-Gost", "chrome.exe"),
|
||||
os.path.join(local_app_data, "Chromium-Gost", "Application", "chrome.exe"),
|
||||
os.path.join(local_app_data, "Programs", "Chromium-Gost", "chrome.exe"),
|
||||
os.path.join(local_app_data, "Programs", "Chromium-Gost", "Application", "chrome.exe"),
|
||||
os.path.join(prog_files, "Chromium-Gost", "chrome.exe"),
|
||||
os.path.join(prog_files, "Chromium-Gost", "Application", "chrome.exe"),
|
||||
@ -195,7 +197,8 @@ def launch_browser_for_tls(
|
||||
browser_name = "Яндекс.Браузер" if "yandex" in gost_path.lower() else "Chromium GOST"
|
||||
return browser, f"{browser_name} ({gost_path})"
|
||||
except Exception as e:
|
||||
print(f"\n[GOST] Предупреждение: ошибка прямого запуска ({gost_path}): {e}")
|
||||
err_msg = str(e).encode("ascii", errors="replace").decode("ascii")
|
||||
print(f"\n[GOST] Предупреждение: ошибка прямого запуска ({gost_path}): {err_msg}")
|
||||
print("[GOST] Пробуем подключение по CDP...")
|
||||
|
||||
# ГОСТ TLS: Вариант 2 — подключение по CDP
|
||||
|
||||
Reference in New Issue
Block a user