Goal is to extract a list of Van Gogh paintings from the attached Google search results page.
This is already fully supported on SerpApi. (relevant test, html file, sample json, and expected array.)
Try to come up with your own solution and your own test.
Extract the painting name
, extensions
array (date), and Google link
in an array.
Fork this repository and make a PR when ready. Do not use more than 4 hours of your time.
Programming language wise, Ruby is suggested but feel free to use whatever you feel like.
Parse directly the HTML result page (html file) in this repository. No extra HTTP requests should be needed for anything.
Add also to your array the painting thumbnails present in the result page file (not the ones where extra requests are needed).
Test against 2 other similar result pages. (Pages that contain the same kind of carrousel. Don't necessarily have to be paintings.)
I have added multiple test html files like cars carousel, movie cast carousel for testing and can be tested with individual command line argument. Some of the example commands are added below.
ruby scrapper.rb van_gogh_paintings
ruby scrapper.rb avengers_endgame_cast
ruby scrapper.rb bmw_cars
ruby scrapper.rb harry_potter_cast