Sunday, October 22, 2017

headless-chrome - getting started in ruby

headless-chrome

- Install Chrome 59 or later from google.com/chrome

- download chromedriver and put in a new folder called 'chromedriver'; so the path to the binary is similar to - /home/sai/chromedriver/chromedriver

- now we have to add the above binary's path to PATH 
-- Open the below file in nano editor
nano ~/.bash_profile
-- add the below line
PATH=$PATH:/home/sai/chromedriver export PATH

- gem install selenium-webdriver

- gem install chromedriver-helper

- Now we can start executing the scripts found in -  https://readysteadycode.com/howto-scrape-websites-with-ruby-and-headless-chrome

No comments:

Post a Comment

Followers

Blog Archive