Skip to content

Bulk asynchronous downloader for multiple file hosts

Fix dict type hinting?

Jules39d1dbc7af7d
diff --git a/URLs.txt b/URLs.txt
index e69de29bb..b020c0224 100644
--- a/URLs.txt
+++ b/URLs.txt
@@ -0,0 +1 @@
+https://bunkr.is/a/QsoCjchn
\ No newline at end of file
diff --git a/utils/downloaders.py b/utils/downloaders.py
index 2dae74dec..eec8479d1 100644
--- a/utils/downloaders.py
+++ b/utils/downloaders.py
@@ -2,7 +2,7 @@ import asyncio
import itertools
from functools import wraps
from pathlib import Path
-from typing import Any, Callable, Iterable, List, Optional, Tuple, Type, TypeVar, Union, cast
+from typing import Any, Callable, Iterable, List, Optional, Tuple, Type, TypeVar, Union, cast, Dict
from urllib.parse import urljoin, urlparse
import aiofiles
import aiohttp
@@ -175,7 +175,7 @@ class BunkrDownloader(Downloader):
await super().download_all(links, session, headers=headers, show_progress=show_progress)
-def get_downloaders(urls: dict[dict[list[str]]], folder: Path, max_workers: int) -> List[Downloader]:
+def get_downloaders(urls: Dict[str, Dict[str, List[str]]], folder: Path, max_workers: int) -> List[Downloader]:
"""Get a list of downloaders for each supported type of URLs.
We shouldn't just assume that each URL will have the same netloc as