fix: v0.5.11 - Corrected sandbox parameter name to sandbox=False for Zendriver v0.15.2

This commit is contained in:
2026-01-03 21:52:53 +09:00
parent 9832cc5bc2
commit 62c2b65f8a
4 changed files with 41 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
title: "애니 다운로더" title: "애니 다운로더"
version: "0.5.10" version: "0.5.11"
package_name: "anime_downloader" package_name: "anime_downloader"
developer: "projectdx" developer: "projectdx"
description: "anime downloader" description: "anime downloader"

View File

@@ -164,14 +164,14 @@ async def ensure_browser() -> Any:
browser = await zd.start( browser = await zd.start(
headless=True, headless=True,
browser_executable_path=exec_path, browser_executable_path=exec_path,
no_sandbox=True, sandbox=False,
browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"] browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
) )
else: else:
log_debug("[ZendriverDaemon] Starting browser with default path") log_debug("[ZendriverDaemon] Starting browser with default path")
browser = await zd.start( browser = await zd.start(
headless=True, headless=True,
no_sandbox=True, sandbox=False,
browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"] browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
) )

View File

@@ -62,13 +62,13 @@ async def fetch_html(url: str, timeout: int = 60, browser_path: str = None) -> d
browser = await zd.start( browser = await zd.start(
headless=True, headless=True,
browser_executable_path=exec_path, browser_executable_path=exec_path,
no_sandbox=True, sandbox=False,
browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"] browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
) )
else: else:
browser = await zd.start( browser = await zd.start(
headless=True, headless=True,
no_sandbox=True, sandbox=False,
browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"] browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
) )

View File

@@ -3,29 +3,48 @@ import asyncio
import zendriver as zd import zendriver as zd
import sys import sys
import os import os
import inspect
async def test(): async def test():
print("Testing Zendriver Startup...") print("=== Zendriver API Inspection ===")
print(f"EUID: {os.geteuid()}")
# Check what parameters zendriver Config accepts
config = zd.Config()
print(f"Default Config no_sandbox: {getattr(config, 'no_sandbox', 'N/A')}")
# Inspect zd.start
print("\n--- zd.start Signature ---")
try: try:
# Try starting with explicit args sig = inspect.signature(zd.start)
print("Attempting to start browser with no_sandbox=True and explicit --no-sandbox arg...") print(sig)
browser = await zd.start( for param in sig.parameters.values():
headless=True, print(f" {param.name}: {param.default}")
no_sandbox=True, except Exception as e:
browser_args=["--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu"] print(f"Failed to inspect zd.start: {e}")
)
print("Success! Browser started.") # Inspect zd.Config
print("\n--- zd.Config Attributes ---")
try:
config = zd.Config()
# Filter out dunder methods
attrs = [a for a in dir(config) if not a.startswith("__")]
print(attrs)
# Check current values
for a in attrs:
try:
val = getattr(config, a)
if not callable(val):
print(f" {a} = {val}")
except:
pass
except Exception as e:
print(f"Failed to inspect zd.Config: {e}")
print("\n--- Testing Config 3: 'arguments' instead of 'browser_args' ---")
try:
# Based on typical Zendriver usage, it might be 'arguments'
browser = await zd.start(headless=True, no_sandbox=True, arguments=["--no-sandbox", "--disable-dev-shm-usage"])
print("Success with Config 3 (arguments)!")
await browser.stop() await browser.stop()
except Exception as e: except Exception as e:
print(f"Failed to start: {e}") print(f"Config 3 (arguments) Failed: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__": if __name__ == "__main__":
asyncio.run(test()) asyncio.run(test())