Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
feat: support albums (Fileditch)
NTFSvolumec6b8819d0857
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 849215252..5363465c8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Added- Support premium URLs (direct links)(GoFile)+- FileditchAlbums support### Fixeddiff --git a/cyberdrop_dl/crawlers/fileditch.py b/cyberdrop_dl/crawlers/fileditch.pyindex 0467193ef..bc5120d02 100644--- a/cyberdrop_dl/crawlers/fileditch.py+++ b/cyberdrop_dl/crawlers/fileditch.py@@ -85,6 +85,34 @@ class FileditchCrawler(Crawler):return src, _extr_thumb(soup)+@FileditchCrawler.__http_config__+class FileditchAlbumsCrawler(Crawler):+ # Keep this as a separate class. Site changes domains frequently+ # Let the scrape mapper dispatch to the best matching domain+ SUPPORTED_PATHS: ClassVar[SupportedPaths] = {+ "Album": "/<album_id>",+ }+ PRIMARY_URL: ClassVar[AbsoluteHttpURL] = AbsoluteHttpURL("https://fileditchalbums.st")+ DOMAIN: ClassVar[str] = "fileditchalbums"+ FOLDER_DOMAIN: ClassVar[str] = FileditchCrawler.FOLDER_DOMAIN++ async def fetch(self, scrape_item: ScrapeItem) -> None:+ match scrape_item.url.parts[1:]:+ case [album_id]:+ await self.album(scrape_item, album_id)+ case _:+ raise ValueError++ @error_handling_wrapper+ async def album(self, scrape_item: ScrapeItem, album_id: str) -> None:+ soup = await self.request_soup(scrape_item.url)+ name = self.create_title(css.select_text(soup, "h1.title"))+ scrape_item.setup_as_album(name, album_id=album_id)+ for new_item in self.iter_children(scrape_item, soup, ".grid article.card > a.thumb[href]"):+ self.handle_embed(new_item)+ scrape_item.add_children()++def _extr_thumb(soup: bs4.Tag) -> str | None:try:return extr_text(css.select(soup, ".vposter[style]", "style"), "background-image:url(", ")").strip("'")diff --git a/pyproject.toml b/pyproject.tomlindex 1968e0032..2dd5784c4 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[project]name = "cyberdrop-dl-patched"-version = "10.9.0dev1"+version = "10.9.0dev2"authors = [{name = "Jacob B", email = "[email protected]"}]classifiers = ["Development Status :: 5 - Production/Stable",diff --git a/tests/crawlers/test_cases/fileditch.py b/tests/crawlers/test_cases/fileditch.pyindex 0c4ce9583..9beccfd11 100644--- a/tests/crawlers/test_cases/fileditch.py+++ b/tests/crawlers/test_cases/fileditch.py@@ -69,4 +69,17 @@ TEST_CASES = [],"count": 1,},+ {+ "url": "https://fileditchalbums.st/pbxrzgde8g",+ "description": "album",+ "results": [+ {+ "url": "ANY",+ "album_id": "pbxrzgde8g",+ "uploaded_at": None,+ "download_folder": "re:wehavealbumsnow (Fileditch)",+ },+ ],+ "count": 8,+ },]diff --git a/uv.lock b/uv.lockindex ed599e96a..eb000289e 100644--- a/uv.lock+++ b/uv.lock@@ -683,7 +683,7 @@ wheels = [[[package]]name = "cyberdrop-dl-patched"-version = "10.9.0.dev1"+version = "10.9.0.dev2"source = { editable = "." }dependencies = [{ name = "aiodns", marker = "sys_platform != 'android' and sys_platform != 'win32'" },