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