python-chromedriver-autoinstaller icon indicating copy to clipboard operation
python-chromedriver-autoinstaller copied to clipboard

build time instead of runtime?

Open sneak opened this issue 4 years ago • 4 comments

It would be cool if this could be used as a utility, e.g. python3 -mchromedriver_autoinstaller install, so that it could do the downloading/installing during build time (e.g. in Dockerfile) instead of at runtime.

sneak avatar Oct 19 '20 11:10 sneak

Hi @sneak ,

I have been able to achieve similar results by creating a setup script as:

setup_chromedriver.py

import chromedriver_autoinstaller
import sys

if __name__ == "__main__":
    is_cwd = True if "--cwd" in sys.args else False
    chromedriver_autoinstaller.install(cwd=is_cwd)

that I can later run as: python setup_chromedriver.py or python setup_chromedriver.py --cwd

Cheers!

navdeepgaur avatar Jul 05 '21 11:07 navdeepgaur

hi @navdeepgaur this still requires runtime import (to setup path), because cwd=True install the chromedriver in subpath like '93/chromedriver.exe' not ./

happyman avatar Sep 09 '21 06:09 happyman

Thanks for your comments. I will apply it to the next version.

yeongbin-jo avatar Dec 16 '21 04:12 yeongbin-jo

Little bit problem to use it in corporate network. Please add proxy settings.

martin-zahorsky avatar Sep 21 '22 12:09 martin-zahorsky