Skip to content

Instantly share code, notes, and snippets.

@ice2heart
Last active June 23, 2018 08:15
Show Gist options
  • Select an option

  • Save ice2heart/9889888 to your computer and use it in GitHub Desktop.

Select an option

Save ice2heart/9889888 to your computer and use it in GitHub Desktop.
require 'rss/2.0'
require 'cgi'
require 'net/http'
host = Net::HTTP.new('bash.im', 443)
host.use_ssl = true
resp = host.get('https://bash.im/rss/')
data = resp.body
parsed = RSS::Parser.parse(data.gsub(/\<hr\>/, '<hr/>'), false)
parsed.items.each { |x| puts CGI::unescapeHTML(x.description.gsub("\n", "").gsub("<br>", "\n")); puts "%\n" }
@scry3r
Copy link
Copy Markdown

scry3r commented Aug 25, 2015

Thanks!

@MeDVen
Copy link
Copy Markdown

MeDVen commented Jan 14, 2016

Thanks! It's work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment