lib/onsen.rb in rget-3.2.3 vs lib/onsen.rb in rget-4.0.0

- old
+ new

@@ -2,11 +2,16 @@ require 'webradio' require 'nokogiri' class Onsen < WebRadio - def download(name) - onsen_download(name, @url.scan(%r|/([^/]*)/$|).flatten.first) + def initialize(params, options) + super + @cover = "//*[@id='newProgramWrap']//img[1]/@src" unless @cover + end + + def download + onsen_download(@label, @url.scan(%r|/([^/]*)/$|).flatten.first) end def dump tag = Pathname(@url).basename.to_s.gsub(%r|[-/]|, '_') html = Nokogiri(open(@url, &:read))