Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 30th, 2012  |  syntax: None  |  size: 1.40 KB  |  views: 155  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">
  2. <channel>
  3. <title>
  4.   title..
  5. </title>
  6. <atom:link href="http://url/news/feed/" rel="self" type="application/rss+xml"/>
  7. <link>http://url</link>
  8. <description>
  9.   … description...
  10. </description>
  11. <lastBuildDate>Tue, 20 Nov 2012 14:37:30 +0000</lastBuildDate>
  12. <language>sk-SK</language>
  13. <sy:updatePeriod>hourly</sy:updatePeriod>
  14. <sy:updateFrequency>1</sy:updateFrequency>
  15. <generator>http://wordpress.org/?v=3.4.2</generator>
  16. <item>
  17. <title>title</title>
  18. <link>
  19.    link
  20. </link>
  21. <comments>
  22.    link to comments
  23. </comments>
  24. <pubDate>Tue, 20 Nov 2012 13:29:05 +0000</pubDate>
  25. <dc:creator>fcomp</dc:creator>
  26. <category>
  27. <![CDATA[ Novinky ]]>
  28. </category>
  29. <guid isPermaLink="false">http://url/?p=560</guid>
  30. <description>
  31. <![CDATA[
  32. <p>text
  33. ]]>
  34. <![CDATA[
  35.   text
  36. ]]>
  37. </description>
  38. <content:encoded>
  39. <![CDATA[
  40.   text
  41. ]]>
  42. </content:encoded>
  43. <wfw:commentRss>
  44.   url
  45. </wfw:commentRss>
  46. <slash:comments>0</slash:comments>
  47. </item>
  48. ...
  49.        
  50. def rss_feed
  51.     feed = Feedzirra::Feed.fetch_and_parse("http://url/news/feed/")
  52.     feed.entries.each do |entry|
  53.       puts entry.inspect
  54.     end
  55.   end
  56.        
  57. undefined method `entries' for nil:NilClass