Skip to content

Instantly share code, notes, and snippets.

@dlapiduz
Created July 17, 2012 13:50
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 dlapiduz/3129494 to your computer and use it in GitHub Desktop.
Save dlapiduz/3129494 to your computer and use it in GitHub Desktop.
MRSS Tester
require "rubygems"
require 'open-uri'
require "nokogiri"
url = "http://cdn.playwire.com/343/mrsses/397.xml"
doc = Nokogiri::HTML(open(url))
doc.xpath('//item/content').each do |d|
url_to_get = d.attributes['url'].value
status = `curl -IL #{url_to_get} 2>/dev/null | awk '{print $2}' | sed -n '1p'`
puts url_to_get if status.to_i == 403
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment