diff --git a/archivebox/plugins_pkg/playwright/apps.py b/archivebox/plugins_pkg/playwright/apps.py index 96fac341..5d0a3c7f 100644 --- a/archivebox/plugins_pkg/playwright/apps.py +++ b/archivebox/plugins_pkg/playwright/apps.py @@ -152,7 +152,13 @@ class PlaywrightBinProvider(BaseBinProvider): # chrome@129.0.6668.58 /data/lib/browsers/chrome/mac_arm-129.0.6668.58/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing # playwright build v1010 downloaded to /home/squash/.cache/ms-playwright/ffmpeg-1010 - output_lines = [line for line in proc.stdout.strip().split('\n') if '/chrome-' in line] + output_lines = [ + line for line in proc.stdout.strip().split('\n') + if '/chrom' in line + and 'chrom' in line.rsplit('/', 1)[-1].lower() # make final path segment (filename) contains chrome or chromium + and 'xdg-settings' not in line + and 'ffmpeg' not in line + ] if output_lines: relpath = output_lines[0].split(self.playwright_browsers_dir)[-1] abspath = self.playwright_browsers_dir / relpath diff --git a/archivebox/plugins_pkg/puppeteer/apps.py b/archivebox/plugins_pkg/puppeteer/apps.py index f44927c1..e11be4df 100644 --- a/archivebox/plugins_pkg/puppeteer/apps.py +++ b/archivebox/plugins_pkg/puppeteer/apps.py @@ -131,7 +131,7 @@ class PuppeteerBinProvider(BaseBinProvider): # to proceed? (y) chrome@129.0.6668.91 /tmp/test3/lib/x86_64-linux/browsers/chrome/linux-129.0.6668.91/chrome-linux64/chrome # chrome@129.0.6668.58 /data/lib/browsers/chrome/mac_arm-129.0.6668.58/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing - relpath = proc.stdout.strip().split(str(self.puppeteer_browsers_dir))[-1] + relpath = proc.stdout.strip().split(str(self.puppeteer_browsers_dir))[-1].split('\n', 1)[0] abspath = self.puppeteer_browsers_dir / relpath if os.path.isfile(abspath) and os.access(abspath, os.X_OK):