Open klemenStanic opened 1 year ago
Extensions cannot be run in headless mode, which single-file-cli
uses by default.
Here's what I use:
home_config="/home/<user>/.config"
ublock_path="$home_config/chromium/Default/Extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm/1.44.2_1"
singlefile_opts=(
--browser-headless false
--browser-args '["--user-data-dir='$home_config'/chromium/Default","--disable-extensions-except='$ublock_path'","--load-extension='$ublock_path'"]'
)
single-file-cli "${singlefile_opts[@]}" <url>
In addition, I also had to do this once:
chromium --no-first-run --no-default-browser-check --user-data-dir=$home_config/chromium/Default --load-extension=$ublock_path
Allow in Incognito
option for ublock as that is what single-file-cli uses in the latest codeAdapt to your extensions accordingly. If you also use chrome/chromium as your main browser, use a separate profile for single-file-cli
by creating one and changing the paths above.
How do I run a chrome extension (e.g. IDontCareAboutCookies) within the webdriver? I tried running the single-file cli with
but the extension doesn't seem to work, and the returned single-file contains the popups. The path to the extension is correct. Any ideas?