Open dinuka-dev opened 3 days ago
Based on this Stack Overflow post, I think what you are doing should work.
It's possible that the answer is outdated though and the --load-extension
flag no longer does anything.
The only other thing I would suggest is to try setting up a persistent user data directory by setting
config.user_data_dir = "/some/path/"
Then run your script to open the browser, manually add the extension, and close.
Hopefully then the extension will stay installed for subsequent runs.
--load-extension works. I am using it in my code with zendriver. Many extensions require a user confirmation now so that also has to be handled.
Here is the exact line that i use: browser_args.append(f"--load-extension={ghostery_extension_path}")
I need to load an unpacked chrome extension. How can i do that?
Below is my current code: