Returns either the :tl:`WebDocument` content for
        normal results or the :tl:`Document` for media results.
189436
def document(self):
        
        if isinstance(self.result, types.BotInlineResult):
            return self.result.content
        elif isinstance(self.result, types.BotInlineMediaResult):
            return self.result.document
639000
def contents(self):
        
        if not hasattr(self, "_content"):
            self._content = self.get_content()
        return self._content
955932
def doc
      @document = Nokogiri::HTML(@body)
      rescue Exception => e
        puts e.inspect
        puts e.backtrace
    end
247041
def document(self):
        """"""
        resp = request.environ.get('pylons.original_response')
        page = error_document_template % \
            dict(prefix=request.environ.get('SCRIPT_NAME', ''),
                 code=request.params.get('code', resp.status_int),
                 message=request.params.get('message', resp.body))
        return page
631237
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return DocumentPermissionInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            document_sid=self._solution['document_sid'],
            identity=self._solution['identity'],
        )
486391
def to_document(self):
        
        return dict(
            info=thaw(self.info),
            paths=thaw(self.paths),
            definitions=thaw(self.definitions),
            securityDefinitions=thaw(self.securityDefinitions),
            security=thaw(self.security),
            swagger=thaw(self.swagger),
        )
1346036
def get_output_docs(self):
        
        if not self.parsed:
            self._parse()
        lst = []
        for e in self.docs_list:
            lst.append(e['docs'].get_raw_docs())
        return lst
421033
def document
      json = Net::HTTP.get_response URI.parse(query_string(@query))
      json.body
    end
391169
def get_input_document(document):
    """"""
    try:
        if document.SUBCLASS_OF_ID == 0xf33fdb68:  # crc32(b'InputDocument'):
            return document
    except AttributeError:
        _raise_cast_fail(document, 'InputDocument')

    if isinstance(document, types.Document):
        return types.InputDocument(
            id=document.id, access_hash=document.access_hash,
            file_reference=document.file_reference)

    if isinstance(document, types.DocumentEmpty):
        return types.InputDocumentEmpty()

    if isinstance(document, types.MessageMediaDocument):
        return get_input_document(document.document)

    if isinstance(document, types.Message):
        return get_input_document(document.media)

    _raise_cast_fail(document, 'InputDocument')
512962
function rawData() {
  return {
    DocumentationGeneration: {
      name: 'DocumentationGeneration',
      submodules: {},
      elements: {},
      classes: {
        'Some.Class.ClassItem': 1,
        'SomeOther.Class.Description': 1
      },
      fors: {},
      namespaces: {},
      tag: 'module',
      file: 'lib/parse-markdown.js',
      line: 4,
      description: '# An H1\nAnd a paragraph'
    },
    CreateDirs: {
      name: 'CreateDirs',
      submodules: {},
      elements: {},
      classes: {
        'Some.Class.ClassItem': 1,
        'SomeOther.Class.Description': 1
      },
      fors: {},
      namespaces: {},
      tag: 'module',
      file: 'lib/create-dirs.js',
      line: 7,
      description: '`some code`'
    }
  };
}
264378
def _get_page_content(self, response):
        
        document = html5lib.parse(
            response.content,
            encoding=response.encoding,
            treebuilder='etree',
            namespaceHTMLElements=False
        )
        # etree doesn't fully support XPath, so we can't just search
        # the attribute values for "content"
        divs = document.findall(
            ".//body//div[@class]")
        content_div = None
        for div in divs:
            if "content" in div.attrib['class'].split(' '):
                content_div = div
                break

        # The `Element` object is False-y when there are no subelements,
        # so compare to `None`
        if content_div is None:
            return None
        return content_div
311722
def _docs(self):
        
        iterdocs = iter(self.docs())
        first = next(iterdocs)
        needs_parsing = False
        if isinstance(first, six.string_types):
            needs_parsing = True
        elif isinstance(first, dict):
            pass
        else:
            raise RuntimeError('Document must be either JSON strings or dict.')
        for doc in itertools.chain([first], iterdocs):
            if needs_parsing:
                doc = json.loads(doc)
            if '_index' not in doc:
                doc['_index'] = self.index
            if '_type' not in doc:
                doc['_type'] = self.doc_type
            yield doc
1202050
def document(self):
        
        doc = {'mode': self.__mongos_mode}
        if self.__tag_sets not in (None, [{}]):
            doc['tags'] = self.__tag_sets
        if self.__max_staleness != -1:
            doc['maxStalenessSeconds'] = self.__max_staleness
        return doc
1342889
def document(self):
        
        if self.is_document:
            return self
        return self.adapter.wrap_document(self.adapter.impl_document)
51921
def get_doc(self, objtxt):
        """"""
        obj, valid = self._eval(objtxt)
        if valid:
            return getdoc(obj)
33831
def fetchDocument(self, key, rawResults = False, rev = None) :
        """"""
        url = "%s/%s/%s" % (self.documentsURL, self.name, key)
        if rev is not None :
            r = self.connection.session.get(url, params = {'rev' : rev})
        else :
            r = self.connection.session.get(url)

        if r.status_code < 400 :
            if rawResults :
                return r.json()
            return self.documentClass(self, r.json())
        elif r.status_code == 404 :
            raise DocumentNotFoundError("Unable to find document with _key: %s" % key, r.json())
        else :
            raise DocumentNotFoundError("Unable to find document with _key: %s, response: %s" % (key, r.json()), r.json())
1144159
def get_text(html_content, display_images=False, deduplicate_captions=False, display_links=False):
    '''
    
    '''
    html_content = html_content.strip()
    if not html_content:
        return ""

    # strip XML declaration, if necessary
    if html_content.startswith('<?xml '):
        html_content = RE_STRIP_XML_DECLARATION.sub('', html_content, count=1)

    html_tree = fromstring(html_content)
    parser = Inscriptis(html_tree, display_images=display_images, deduplicate_captions=deduplicate_captions, display_links=display_links)
    return parser.get_text()