(path: str)
Fetch CDXJ file content from a URL.
Fetch CDXJ file content from a URL.
Fetch CDXJ file content from a URL .
def fetch_web_index(path: str) -> Optional[str]:
    """Fetch CDXJ file content from a URL."""
    scheme = urlparse(path).scheme

    if not scheme:
        return None

    try:
        return requests.get(path).text

    except (
        requests.ConnectionError,
        requests.HTTPError,
    ) as err:
        raise BackendError(backend_name='web') from err
def fetch_web_index ( path : str ) -> Optional [ str ] : scheme = urlparse ( path ) . scheme if not scheme : return None try : return requests . get ( path ) . text except ( requests . ConnectionError , requests . HTTPError , ) as err : raise BackendError ( backend_name = 'web' ) from err