Skip to content

Instantly share code, notes, and snippets.

View SimonMiaou's full-sized avatar

Simon Lacroix SimonMiaou

View GitHub Profile
require 'nokogiri'
require 'net/http'
require 'uri'
url = 'http://oioioi.ru/mp3/skinhead/moonstomp.html'
regex = /\Ahttp:\/\/www\.skinhead\.ru\/mp3\/(.*\.mp3)\z/i
folder = File.dirname(__FILE__)+'/oioioi/'
Dir.mkdir(folder) unless Dir.exists?(folder)
def open(url)