All pastes #121928 Raw Edit

Mine

public ruby v1 · immutable
·published 2006-08-08 08:23 UTC
rendered paste body
--- /home/prog-17/lyrics_lyrc.rb	2006-08-08 11:16:15.000000000 +0300+++ /usr/share/apps/amarok/scripts/lyrics_lyrc/lyrics_lyrc.rb	2006-08-08 11:17:56.000000000 +0300@@ -103,16 +103,21 @@ def fetchLyrics( artist, title, url )     proxy_host = nil     proxy_port = nil+    proxy_user = nil+    proxy_pass = nil     if ( ENV['http_proxy'] && proxy_uri = URI.parse( ENV['http_proxy'] ) )         proxy_host = proxy_uri.host         proxy_port = proxy_uri.port+	if ( proxy_uri.userinfo )+	    proxy_user, proxy_pass = proxy_uri.userinfo.split(/:/)+	end     end      host = "lyrc.com.ar"     path = url.empty? ? "/en/tema1en.php?artist=#{artist}&songname=#{title}" : "/en/#{url}"     @page_url = "http://" + host + path -    h = Net::HTTP.new( host, 80, proxy_host, proxy_port )+    h = Net::HTTP.new( host, 80, proxy_host, proxy_port, proxy_user, proxy_pass)     response = h.get( path )      unless response.code == "200"