lib/wmap/utils/url_magic.rb
# Wrapper to return relative path component of the URL. i.e. http://www.yahoo.com/login.html => /login.html
Wrapper to return relative path component of the URL.
Wrapper to return relative path component of the URL .
def url_2_path(url)
		url.strip!
		base = url_2_site(url).chop
		path=url.sub(base,'')
		return path
	rescue => ee
		puts "Exception on method #{__method__} for #{url}: #{ee}" if @verbose
	end
def url_2_path ( url ) url . strip! base = url_2_site ( url ) . chop path = url . sub ( base , '' ) return path rescue => ee puts "Exception on method #{__method__} for #{url}: #{ee}" if @verbose end
Wrapper to return relative path component of the URL.
Wrapper to return relative path component of the URL .
#puts "Retrieve the relative path component of the url: #{url}" if @verbose #puts "Path component found: #{path}" if @verbose
url
<not_specific>