Skip to content

Instantly share code, notes, and snippets.

@youpy
Created June 20, 2012 11:58
Show Gist options
  • Save youpy/2959539 to your computer and use it in GitHub Desktop.
Save youpy/2959539 to your computer and use it in GitHub Desktop.
%w(open-uri nokogiri uri).each {|g| require g }
p !!Nokogiri::HTML(open(url = ARGV.shift)).xpath('//script[@src]').find {|s| (URI(url) + s['src']).to_s =~ /\/a.js$/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment