2
0
Эх сурвалжийг харах

no longer recommend snap chromium, just use playwright

Nick Sweeting 4 жил өмнө
parent
commit
7d1f8cb496
3 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 1 1
      README.md
  2. 1 1
      archivebox/main.py
  3. 1 1
      stdeb.cfg

+ 1 - 1
README.md

@@ -215,7 +215,7 @@ echo "deb-src http://ppa.launchpad.net/archivebox/archivebox/ubuntu focal main"
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C258F79DCC02E369
 sudo apt update
 sudo apt install archivebox
-sudo snap install chromium
+archivebox setup
 archivebox --version
 # then scroll back up and continue the initalization instructions above
 </code></pre>

+ 1 - 1
archivebox/main.py

@@ -952,7 +952,7 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None:
                 ], capture_output=False, cwd=out_dir)
                 run_shell([PYTHON_BINARY, '-m', 'playwright', 'install', 'chromium'], capture_output=False, cwd=out_dir)
                 proc = run_shell([PYTHON_BINARY, '-c', 'from playwright.sync_api import sync_playwright; print(sync_playwright().start().chromium.executable_path)'], capture_output=True, text=True, cwd=out_dir)
-                NEW_CHROME_BINARY = proc.stdout.strip()
+                NEW_CHROME_BINARY = proc.stdout.decode().strip() if isinstance(bytes, proc.stdout) else proc.stdout.strip()
                 assert NEW_CHROME_BINARY and len(NEW_CHROME_BINARY), 'CHROME_BINARY must contain a path'
                 config(f'CHROME_BINARY={NEW_CHROME_BINARY}', set=True, out_dir=out_dir)
             except BaseException as e:

+ 1 - 1
stdeb.cfg

@@ -5,6 +5,6 @@ Package3: archivebox
 Suite: focal
 Suite3: focal
 Build-Depends: dh-python, python3-pip, python3-setuptools, python3-wheel, python3-stdeb
-Depends3: nodejs, chromium-browser, wget, curl, git, ffmpeg, youtube-dl, python3-croniter, python3-crontab, python3-dateparser, python3-django, python3-django-extensions, python3-django-jsonfield, python3-mypy-extensions, python3-requests, python3-w3lib, ripgrep
+Depends3: nodejs, wget, curl, git, ffmpeg, youtube-dl, python3-croniter, python3-crontab, python3-dateparser, python3-django, python3-django-extensions, python3-django-jsonfield, python3-mypy-extensions, python3-requests, python3-w3lib, ripgrep
 XS-Python-Version: >= 3.7
 Setup-Env-Vars: DEB_BUILD_OPTIONS=nocheck