docs: Finalize Phase 10 documentation for Zendriver Docker support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
title: "애니 다운로더"
|
||||
version: "0.5.14"
|
||||
version: "0.5.15"
|
||||
package_name: "anime_downloader"
|
||||
developer: "projectdx"
|
||||
description: "anime downloader"
|
||||
|
||||
@@ -58,6 +58,7 @@ def find_browser_executable() -> Optional[str]:
|
||||
# 먼저 절대 경로 확인
|
||||
for path in common_paths:
|
||||
if path.startswith("/") and os.path.exists(path):
|
||||
log_debug(f"[ZendriverDaemon] Found browser at absolute path: {path}")
|
||||
return path
|
||||
|
||||
# shutil.which로 PATH 확인
|
||||
@@ -65,6 +66,7 @@ def find_browser_executable() -> Optional[str]:
|
||||
for cmd in ["google-chrome", "google-chrome-stable", "chromium-browser", "chromium"]:
|
||||
found = shutil.which(cmd)
|
||||
if found:
|
||||
log_debug(f"[ZendriverDaemon] Found browser via shutil.which: {found}")
|
||||
return found
|
||||
|
||||
return None
|
||||
|
||||
92
zd_debug.py
92
zd_debug.py
@@ -6,56 +6,56 @@ import os
|
||||
import subprocess
|
||||
|
||||
async def test():
|
||||
print("=== Zendriver Final Stand Debug ===")
|
||||
print("=== Zendriver Google Chrome Debug (v0.5.14) ===")
|
||||
|
||||
browser_bin = "/bin/chromium-browser"
|
||||
if not os.path.exists(browser_bin):
|
||||
browser_bin = "/usr/bin/chromium-browser"
|
||||
# Check possible paths
|
||||
bin_paths = ["/usr/bin/google-chrome", "/usr/bin/google-chrome-stable", "/usr/bin/chromium-browser"]
|
||||
|
||||
print(f"Testing browser binary: {browser_bin}")
|
||||
|
||||
# 1. Try to run browser version check
|
||||
try:
|
||||
print("\n--- Checking Browser Version ---")
|
||||
out = subprocess.check_output([browser_bin, "--version"], stderr=subprocess.STDOUT).decode()
|
||||
print(f"Version output: {out}")
|
||||
except Exception as e:
|
||||
print(f"Version check failed: {e}")
|
||||
if hasattr(e, 'output'):
|
||||
print(f"Error output: {e.output.decode()}")
|
||||
for browser_bin in bin_paths:
|
||||
if not os.path.exists(browser_bin):
|
||||
continue
|
||||
|
||||
print(f"\n>>> Testing binary: {browser_bin}")
|
||||
|
||||
# 1. Version Check
|
||||
try:
|
||||
out = subprocess.check_output([browser_bin, "--version"], stderr=subprocess.STDOUT).decode()
|
||||
print(f"Version: {out.strip()}")
|
||||
except Exception as e:
|
||||
print(f"Version check failed: {e}")
|
||||
if hasattr(e, 'output'):
|
||||
print(f"Output: {e.output.decode()}")
|
||||
|
||||
# 2. Try to run browser with minimum flags to see if it crashes
|
||||
print("\n--- Direct Subprocess Start Test (Headless + No Sandbox) ---")
|
||||
try:
|
||||
# Just try to get help or something that starts the engine
|
||||
cmd = [browser_bin, "--headless", "--no-sandbox", "--disable-gpu", "--remote-debugging-port=9222", "--about:blank"]
|
||||
print(f"Running: {' '.join(cmd)}")
|
||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
await asyncio.sleep(3)
|
||||
if proc.poll() is None:
|
||||
print(">>> SUCCESS: Browser process is ALIVE after 3 seconds!")
|
||||
proc.terminate()
|
||||
else:
|
||||
stdout, stderr = proc.communicate()
|
||||
print(f"FAIL: Browser process DIED instantly (code {proc.returncode})")
|
||||
print(f"STDOUT: {stdout.decode()}")
|
||||
print(f"STDERR: {stderr.decode()}")
|
||||
except Exception as e:
|
||||
print(f"Process start test failed: {e}")
|
||||
# 2. Minimum execution test (Headless + No Sandbox)
|
||||
print("--- Direct Execution Test ---")
|
||||
try:
|
||||
cmd = [browser_bin, "--headless", "--no-sandbox", "--disable-gpu", "--user-data-dir=/tmp/test_chrome", "--about:blank"]
|
||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
await asyncio.sleep(3)
|
||||
if proc.poll() is None:
|
||||
print("SUCCESS: Browser process is alive!")
|
||||
proc.terminate()
|
||||
else:
|
||||
stdout, stderr = proc.communicate()
|
||||
print(f"FAIL: Browser process died (code {proc.returncode})")
|
||||
print(f"STDERR: {stderr.decode()}")
|
||||
except Exception as e:
|
||||
print(f"Execution test failed: {e}")
|
||||
|
||||
# 3. Last try with Zendriver and absolute bare settings
|
||||
print("\n--- Zendriver Barebones Test ---")
|
||||
try:
|
||||
browser = await zd.start(
|
||||
browser_executable_path=browser_bin,
|
||||
headless=True,
|
||||
sandbox=False,
|
||||
browser_args=["--no-sandbox", "--disable-dev-shm-usage"]
|
||||
)
|
||||
print(">>> SUCCESS: Zendriver connected!")
|
||||
await browser.stop()
|
||||
except Exception as e:
|
||||
print(f"Zendriver test failed: {e}")
|
||||
# 3. Zendriver Test
|
||||
print("--- Zendriver Integration Test ---")
|
||||
try:
|
||||
browser = await zd.start(
|
||||
browser_executable_path=browser_bin,
|
||||
headless=True,
|
||||
sandbox=False
|
||||
)
|
||||
print("SUCCESS: Zendriver connected!")
|
||||
await browser.stop()
|
||||
# If we found one that works, we can stop
|
||||
print("\n!!! This path works. Set this in the plugin settings or leave empty if it is the first found.")
|
||||
except Exception as e:
|
||||
print(f"Zendriver failed: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(test())
|
||||
|
||||
Reference in New Issue
Block a user