diff --git a/src/__main__.py b/src/__main__.py index c98a603..f9283aa 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -29,7 +29,9 @@ async def main() -> None: start = perf_counter() # Construct a unique file-name for each URL & ALLOWED_HOSTS_RE combination - cache_file = CACHE_RESULTS_DIR / base64.b64encode((str(URL) + str(ALLOWED_HOSTS_RE)).encode("utf-8")).hex() + readable_prefix = str(URL).removeprefix("https://").removeprefix("http://").replace("/", "_") + unique_suffix = base64.b64encode((str(URL) + str(ALLOWED_HOSTS_RE)).encode("utf-8")).hex() + cache_file = CACHE_RESULTS_DIR / (readable_prefix + "-" + unique_suffix + ".csv") if cache_file.exists(): print("> Using cached urlmap dataframe")