Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Last active August 14, 2019 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbnpercy/d3af52979e38ef4f6d195cd7282141d2 to your computer and use it in GitHub Desktop.
Save rbnpercy/d3af52979e38ef4f6d195cd7282141d2 to your computer and use it in GitHub Desktop.
require 'feedjira'
def hn_articles
url = "https://news.ycombinator.com/rss"
feed = Feedjira::Feed.fetch_and_parse url
arts = feed.entries.each do |item|
puts "Item: #{item.title}"
puts "&& Link: #{item.url}"
end
return arts.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment