lib/youtube_search.rb in youtube_search-0.1.4 vs lib/youtube_search.rb in youtube_search-0.1.5
- old
+ new
@@ -23,10 +23,13 @@
element.elements['*/yt:videoid'].text
else
entry['id'].split('/').last
end
- entry['duration'] = element.elements['*/yt:duration'].attributes['seconds'] unless element.elements['*/yt:duration'].nil?
+ duration = element.elements['*/yt:duration']
+ entry['duration'] = duration.attributes['seconds'] if duration
+
+ entry['raw'] = element
entry
end
end