python-chromedriver-autoinstaller
python-chromedriver-autoinstaller copied to clipboard
build time instead of runtime?
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.
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!
hi @navdeepgaur this still requires runtime import (to setup path), because cwd=True install the chromedriver in subpath like '93/chromedriver.exe' not ./
Thanks for your comments. I will apply it to the next version.
Little bit problem to use it in corporate network. Please add proxy settings.