Skip to content

Instantly share code, notes, and snippets.

@liushooter
Created April 24, 2015 02:24
Show Gist options
  • Save liushooter/2a4f892798a080ae1005 to your computer and use it in GitHub Desktop.
Save liushooter/2a4f892798a080ae1005 to your computer and use it in GitHub Desktop.
💋
require "active_support"
require "rest_client"
url ="http://media.vimcasts.org/videos/index.json"
result = RestClient.get url
json_obj = ActiveSupport::JSON.decode result
json_obj.each do |json |
media_url = json.last["quicktime"]["url"]
puts "*"*100
`echo "#{media_url}" >> wget.txt`
`wget #{media_url}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment