Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
feat: support galleries with 900+ items (picdrop)
NTFSvolume20a4294090d7
diff --git a/cyberdrop_dl/crawlers/picdrop.py b/cyberdrop_dl/crawlers/picdrop.pyindex dd0a8808c..2183463fb 100644--- a/cyberdrop_dl/crawlers/picdrop.py+++ b/cyberdrop_dl/crawlers/picdrop.py@@ -9,7 +9,6 @@ from typing_extensions import AsyncGeneratorfrom cyberdrop_dl.clients.http import HTTPConfigfrom cyberdrop_dl.crawlers.crawler import API, Crawler, SupportedPaths-from cyberdrop_dl.exceptions import ScrapeErrorfrom cyberdrop_dl.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.utils import extr_textfrom cyberdrop_dl.utils._url import remove_query_params@@ -130,8 +129,7 @@ class PicDropAPI(API):return deserialize(Gallery, resp, id=gid, path=path, user=user)async def files(self, path: str) -> AsyncGenerator[File]:- limit = 900- url = (self.ENTRYPOINT / "content" / path / "files").with_query(limit=limit)+ url = (self.ENTRYPOINT / "content" / path / "files").with_query(limit=500)while True:resp = await self.request_json(url)for file in resp["files"]:@@ -140,9 +138,7 @@ class PicDropAPI(API):if not resp.get("hasMore"):break- # TODO: figure out what's the query param to fetch the next page- msg = f"Gallery {path} has more than {limit} files. Only the first {limit} files where downloaded"- raise ScrapeError(422, msg)+ url = url.update_query(offset=resp["lastSortKey"])async def download(self, path: str, key: str) -> AbsoluteHttpURL:assert self._csrf_token