Skip to content

Instantly share code, notes, and snippets.

@dmitry dmitry/
Created Jan 17, 2018

What would you like to do?
Download audio files
require 'open-uri'
require 'nokogiri'
domain = ''
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`
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.