All pastes #153430 Raw Edit

Anonymous

public ruby v1 · immutable
#153430 ·published 2006-08-29 16:25 UTC
rendered paste body
#!/usr/bin/rubyrequire 'net/http'page = ARGV[0]htmlref = Net::HTTP.new('htmlref.com', 80)resp, data = htmlref.get(#{page}, nil)if(resp.code=="200")        data.gsub!(/[\r\n]/, ' ')        if(data =~ /<h2>[^<]+<\/h2>(.+?)<h3>/) 		desc = $1 	else 		puts "no match" 	end        puts dataelse        puts resp.codeend