Skip to content

Instantly share code, notes, and snippets.

@dmitry dmitry/slavmir.fm.rb
Created Jan 17, 2018

Embed
What would you like to do?
Download audio files
require 'open-uri'
require 'nokogiri'
domain = 'https://slavmir.fm'
Nokogiri::HTML(open(domain + '/blogs/programmy')).css('.article_preview').to_a.each do |v|
url = domain + v.attributes['href'].value
Nokogiri::HTML(open(url)).css('.track-play').to_a.each do |z|
`curl "#{z.attributes['data-play-music'].value}" -O`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.