Hi there. This neat little program can extract thumbnails and information from a google carousel representation.
You will need the following prerequisites:
- Ruby 3.2.2
- Bundler (get 2.4.18 or newer)
After a call to bundle install
, you should be golden :-)!
You can call the script e.g. like so:
ruby ./lib/services/carousel_parser.rb ./files/buildings-in-bonn.html
If you want to pipe the content into a file, then you can use this command:
ruby ./lib/services/carousel_parser.rb ./files/buildings-in-bonn.html > my_results.json
If you want to change the default root node name and pipe the content into a file, then you can use this command:
ruby ./lib/services/carousel_parser.rb ./files/buildings-in-bonn.html buildings> my_results.json