MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / find_chrome_binary

Function find_chrome_binary

archivebox/config.py:877–901  ·  view source on GitHub ↗

find any installed chrome binaries in the default locations

()

Source from the content-addressed store, hash-verified

875 return f'md5:{file_hash.hexdigest()}'
876
877def find_chrome_binary() -> Optional[str]:
878 """find any installed chrome binaries in the default locations"""
879 # Precedence: Chromium, Chrome, Beta, Canary, Unstable, Dev
880 # make sure data dir finding precedence order always matches binary finding order
881 default_executable_paths = (
882 # '~/Library/Caches/ms-playwright/chromium-*/chrome-mac/Chromium.app/Contents/MacOS/Chromium',
883 'chromium-browser',
884 'chromium',
885 '/Applications/Chromium.app/Contents/MacOS/Chromium',
886 'chrome',
887 'google-chrome',
888 '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
889 'google-chrome-stable',
890 'google-chrome-beta',
891 'google-chrome-canary',
892 '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
893 'google-chrome-unstable',
894 'google-chrome-dev',
895 )
896 for name in default_executable_paths:
897 full_path_exists = shutil.which(name)
898 if full_path_exists:
899 return name
900
901 return None
902
903def find_chrome_data_dir() -> Optional[str]:
904 """find any installed chrome user data directories in the default locations"""

Callers 1

config.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected