Exemplo n.º 1
0
    def _get_remote(self, url):
        """Get the XML data by requesting it from the given URL.

        Parameters
        ----------
        url : str
            Permanent URL to a DOV object.

        Returns
        -------
        xml : bytes
            The raw XML data of this DOV object as bytes.

        """
        xml = get_dov_xml(url)
        HookRunner.execute_xml_downloaded(url.rstrip('.xml'))
        return xml
Exemplo n.º 2
0
    def _get_remote(self, url, session=None):
        """Get the XML data by requesting it from the given URL.

        Parameters
        ----------
        url : str
            Permanent URL to a DOV object.
        session : requests.Session
            Session to use to perform HTTP requests for data. Defaults to None,
            which means a new session will be created for each request.

        Returns
        -------
        xml : bytes
            The raw XML data of this DOV object as bytes.

        """
        xml = get_dov_xml(url, session)
        HookRunner.execute_xml_downloaded(url.rstrip('.xml'))
        return xml