def get_page(url)
      timeout(30) do
        page = open(url)
        @site_domain = page.base_uri.host
        @page_path = page.base_uri.request_uri
        @page = Nokogiri::HTML(page)
      end
    rescue Timeout::Error, EOFError, OpenURI::HTTPError, Errno::ENOENT, TypeError
      return nil
    end
def get_page(url)
      timeout(30) do
        page = open(url)
        @site_domain = page.base_uri.host
        @page_path = page.base_uri.request_uri
        @page = Nokogiri::HTML(page)
      end
    rescue Timeout::Error, EOFError, OpenURI::HTTPError, Errno::ENOENT, TypeError
      return nil
    end
get page with open-uri, then parse it with Nokogiri. Get site domain and path from URI