imasquerade 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/imasquerade.gemspec +1 -1
- data/lib/imasquerade/extractor.rb +9 -3
- data/lib/version.rb +1 -1
- metadata +3 -3
data/imasquerade.gemspec
CHANGED
@@ -19,9 +19,15 @@ module Imasquerade
|
|
19
19
|
response = Curl::Easy.perform(uri) do |curl|
|
20
20
|
curl.headers["User-Agent"] = 'iTunes/10.1.1'
|
21
21
|
end
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
# In case there is some sort of error
|
23
|
+
begin
|
24
|
+
reader = Nokogiri::XML(response.body_str)
|
25
|
+
array_of_feeds = reader.xpath('//xmlns:key[text()="feedURL"]/following-sibling::xmlns:string[1]/text()')
|
26
|
+
return array_of_feeds[0].to_s
|
27
|
+
rescue Nokogiri::XML::SyntaxError => e
|
28
|
+
puts "Caught exception: #{e}"
|
29
|
+
return ""
|
30
|
+
end
|
25
31
|
end
|
26
32
|
end
|
27
33
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ryan Lovelett
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
requirements:
|
169
169
|
- - ">="
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
hash:
|
171
|
+
hash: -4598513057111881966
|
172
172
|
segments:
|
173
173
|
- 0
|
174
174
|
version: "0"
|