Skip to content
Browse files

Fix Xpath synthax for enclosure

  • Loading branch information...
1 parent 4d805be commit f1a4eed5b4a49705bb9e8f26af557ffb8c31ce59 Sébastien Poudat committed Nov 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/urss/feed/rss_entry.rb
View
2 lib/urss/feed/rss_entry.rb
@@ -17,7 +17,7 @@ def self.build(nokogiri_instance, namespace=nil)
entry.author = nokogiri_instance.xpath("./dc:creator", nokogiri_instance.namespaces).text
entry.categories = nokogiri_instance.search("category").collect(&:text).join(", ")
entry.content = nokogiri_instance.xpath("./description").text
- entry.enclosure = nokogiri_instance.xpath("./enclosure[@url]").text
+ entry.enclosure = nokogiri_instance.xpath("./enclosure").attr('url').text if nokogiri_instance.xpath("./enclosure").size > 0
begin
# When having only one media:content then all media:* nodes are used to create one Urss::Media

0 comments on commit f1a4eed

Please sign in to comment.
Something went wrong with that request. Please try again.