lib/wmap/url_crawler.rb
# Wrapper to use OpenURI method 'read' to return url body contents
Wrapper to use OpenURI method 'read' to return url body contents
Wrapper to use OpenURI method ' read ' to return url body contents
def read_url(url)
		puts "Wrapper to return the OpenURI object for url: #{url}" if @verbose
		url_object=open_url(url)
		@visited_urls_by_crawler[url]=true unless @visited_urls_by_crawler.key?(url)
		body=url_object.read
		return body
	rescue => ee
    puts "Exception on method #{__method__}: #{ee}" if @verbose
    return nil
	end
def read_url ( url ) puts "Wrapper to return the OpenURI object for url: #{url}" if @verbose url_object = open_url ( url ) @visited_urls_by_crawler [ url ] = true unless @visited_urls_by_crawler . key? ( url ) body = url_object . read return body rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose return nil end
Wrapper to use OpenURI method 'read' to return url body contents
Wrapper to use OpenURI method ' read ' to return url body contents
url
<not_specific>