Created
January 17, 2018 22:12
-
-
Save dmitry/1b065d7f4788cf6b7fbb189a7c1b0875 to your computer and use it in GitHub Desktop.
Download audio files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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