Skip to content

Instantly share code, notes, and snippets.

@gonglexin
Created November 29, 2012 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gonglexin/715fc65fa4761a23f051 to your computer and use it in GitHub Desktop.
Save gonglexin/715fc65fa4761a23f051 to your computer and use it in GitHub Desktop.
some wonderful music
require 'open-uri'
require 'json'
base_url = 'http://www.xooole.com/js/playlist.js'
playlist = open base_url
songs = JSON.parse playlist.read
songs.keys.each do |song_id|
song_url = "http://www.xooole.com/mp3/m#{song_id.delete('w')}.mp3"
`wget #{song_url}`
end
@gonglexin
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment