Skip to content

Instantly share code, notes, and snippets.

@ice2heart
Last active June 23, 2018 08:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ice2heart/9889888 to your computer and use it in GitHub Desktop.
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" }
@Akhrameev
Copy link

Works fine! Thanks!

@scry3r
Copy link

scry3r commented Aug 25, 2015

Thanks!

@MeDVen
Copy link

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