viddl-rb 0.85 → 0.86

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/plugins/soundcloud.rb +5 -4
  2. metadata +4 -4
@@ -7,12 +7,13 @@ class Soundcloud < PluginBase
7
7
 
8
8
  # return the url for original video file and title
9
9
  def self.get_urls_and_filenames(url, options = {})
10
- doc = Nokogiri::HTML(open(get_http_url(url)))
10
+ doc = Nokogiri::HTML(open(get_http_url(url)))
11
11
  download_filename = doc.at("#main-content-inner img[class=waveform]").attributes["src"].value.to_s.match(/\.com\/(.+)\_/)[1]
12
- download_url = "http://media.soundcloud.com/stream/#{download_filename}"
13
- file_name = transliterate("#{doc.at('//h1/em').text.chomp}") + ".mp3"
12
+ download_url = "http://media.soundcloud.com/stream/#{download_filename}"
13
+ final_url = UtilityHelper.get_final_location(download_url)
14
+ file_name = transliterate("#{doc.at('//h1/em').text.chomp}") + ".mp3"
14
15
 
15
- [{:url => download_url, :name => file_name}]
16
+ [{:url => final_url, :name => file_name}]
16
17
  end
17
18
 
18
19
  def self.transliterate(str)
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viddl-rb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 161
4
+ hash: 167
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 85
9
- version: "0.85"
8
+ - 86
9
+ version: "0.86"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marc Seeger
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-10-05 00:00:00 Z
17
+ date: 2013-10-06 00:00:00 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: nokogiri