def document
      if !@document
        @document = Nokogiri::HTML(self.class.request_sncf(number, date))
        if !itinerary_available?
          @document = Nokogiri::HTML(self.class.request_sncf_itinerary(0))
        end
      end
      if @document.at('#no_results')
        fail TrainNotFound, @document.at('#no_results b').inner_html
      end
      @document
    end
def document
      if !@document
        @document = Nokogiri::HTML(self.class.request_sncf(number, date))
        if !itinerary_available?
          @document = Nokogiri::HTML(self.class.request_sncf_itinerary(0))
        end
      end
      if @document.at('#no_results')
        fail TrainNotFound, @document.at('#no_results b').inner_html
      end
      @document
    end
Returns a new Nokogiri document for parsing.