Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
perf: simplify aio.peek
NTFSvolumeca1456211902
diff --git a/cyberdrop_dl/aio.py b/cyberdrop_dl/aio.pyindex e413f9474..6efce2c40 100644--- a/cyberdrop_dl/aio.py+++ b/cyberdrop_dl/aio.py@@ -120,10 +120,6 @@ class _AsyncChain:async for value in a_iterable:yield value- @staticmethod- async def yield_this[T](obj: T) -> AsyncGenerator[T]:- yield obj-chain = _AsyncChain()@@ -139,7 +135,12 @@ async def peek_first[T](async_iterable: AsyncIterable[T], /) -> tuple[T, AsyncGeasync_iterator = aiter(async_iterable)first = await next(async_iterator)- return first, chain(chain.yield_this(first), async_iterator)+ async def replay_gen():+ yield first+ async for item in async_iterator:+ yield item++ return first, replay_gen()@dataclasses.dataclass(frozen=True, slots=True, eq=False)diff --git a/cyberdrop_dl/clients/http.py b/cyberdrop_dl/clients/http.pyindex 8af051b02..53c3c302b 100644--- a/cyberdrop_dl/clients/http.py+++ b/cyberdrop_dl/clients/http.py@@ -519,18 +519,6 @@ class HTTPMixin(HTTPController, Protocol):return resp.url-@final-class HTTPControllerProxy[T: HTTPMixin]:- def __init__(self, http: T) -> None:- self.controller = http- self.__call__ = http.request- self.json = http.request_json- self.soup = http.request_soup- self.text = http.request_text- self.redirect = http.request_redirect- self.location = http.request_location--@final@frozenclass HTTPConfig(ConfigDataclass):