accessmod/srtm.py
def _token(self) -> str:
        """Find authentiticy token in EarthData homepage as it is required to login.
        Returns
        -------
        token : str
            Authenticity token.
        """
        r = self._session.get(self.EARTHDATA_URL, timeout=self._timeout)
        r.raise_for_status()
        soup = BeautifulSoup(r.text, "html.parser")
        token = ""
        for element in soup.find_all("input"):
            if element.attrs.get("name") == "authenticity_token":
                token = element.attrs.get("value")
        if not token:
            raise requests.exceptions.ConnectionError(
                "Token not found in EarthData login page."
            )
        return token
Find authentiticy token in EarthData homepage as it is required to login.
        Returns
        -------
        token : str
            Authenticity token.
        
Find authentiticy token in EarthData homepage as it is required to login.
Returns

token : str
Authenticity token.
Find authentiticy token in EarthData homepage as it is required to login . Returns token : str Authenticity token .
def _token(self) -> str:
        r = self._session.get(self.EARTHDATA_URL, timeout=self._timeout)
        r.raise_for_status()
        soup = BeautifulSoup(r.text, "html.parser")
        token = ""
        for element in soup.find_all("input"):
            if element.attrs.get("name") == "authenticity_token":
                token = element.attrs.get("value")
        if not token:
            raise requests.exceptions.ConnectionError(
                "Token not found in EarthData login page."
            )
        return token
def _token ( self ) -> str : r = self . _session . get ( self . EARTHDATA_URL , timeout = self . _timeout ) r . raise_for_status ( ) soup = BeautifulSoup ( r . text , "html.parser" ) token = "" for element in soup . find_all ( "input" ) : if element . attrs . get ( "name" ) == "authenticity_token" : token = element . attrs . get ( "value" ) if not token : raise requests . exceptions . ConnectionError ( "Token not found in EarthData login page." ) return token
Find authentiticy token in EarthData homepage as it is required to login.
Find authentiticy token in EarthData homepage as it is required to login .
"""Find authentiticy token in EarthData homepage as it is required to login.
        Returns
        -------
        token : str
            Authenticity token.
        """
self