Run headless chrome as demon and save given links in to pdf -
guys, want run headless chrome in docker container demon , send link chrome. should take link , make pdf.
i found good image.it helps me run chrome in background. still don't know how send link , how chrome, please save web page pdf.
i know how save pdf locally, google has good tutorial
i appreciate help, hope did before
you should use official selenium images. 1 can run below
docker run -p 4444:4444 selenium/standalone-chrome
then use language of choice selenium bindings. below python example. need python , selenium package installed
$ pip install selenium
below code can use control browsr
from selenium import webdriver selenium.webdriver.common.desired_capabilities import desiredcapabilities driver = webdriver.remote("http://127.0.0.1:4444/wd/hub",desiredcapabilities.chrome) driver.get("http://tarunlalwani.com") driver.quit()
see below more details of selenium webdriver in python
Comments
Post a Comment