Extract thumbnails/images for a given youtube video ID or a URL without an API
YouTube Images can be used to extract thumbnails/images for a given youtube video ID or URL without a developer ID. It uses a URL constructor instead of an API
Ruby 1.9 or greater
YouTube Images is released as a Ruby Gem. The gem is to be installed within a Ruby or Rails application. To install, simply add the following to your Gemfile:
# Gemfile
gem 'youtube_images'
After updating your bundle, you can use YouTubeImages::For("video-id") function within your ruby code
For example if you want to fetch the default thumbnail for youtube URL you can do something like this
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:default]
# or
YouTubeImages::For("5zVaFjSxAZs")[:default]
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")
will return a hash for default, medium, high and maximum dimension images
So to access different dimension images you can do something like this
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:medium]
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:high]
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:maximum]