Skip to content

Instantly share code, notes, and snippets.

@ecylmz
Created January 10, 2014 20:59
Show Gist options
  • Save ecylmz/8362480 to your computer and use it in GitHub Desktop.
Save ecylmz/8362480 to your computer and use it in GitHub Desktop.
require 'cgi'
require 'rss'
require 'nokogiri'
feed_url = "http://www.google.com/alerts/feeds/06667186376393157410/7085097342726270821"
response = RSS::Parser.parse(feed_url, false)
response.entries.each do |entry|
p Nokogiri::HTML(CGI.unescapeHTML(entry.title.to_s)).content # Başlık
p Nokogiri::HTML(entry.link.to_s).css("link")[0]["href"] # link
p Nokogiri::HTML(CGI.unescapeHTML(entry.content.to_s)).content # İçerik
p Nokogiri::HTML(CGI.unescapeHTML(entry.published.to_s)).content # Tarih
p "----------"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment