Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: Kemono favourites downloads (#1358)

Jacobd77dacc5d8da
diff --git a/cyberdrop_dl/crawlers/kemono.py b/cyberdrop_dl/crawlers/kemono.py
index 1ea6a9fe4..677a422d5 100644
--- a/cyberdrop_dl/crawlers/kemono.py
+++ b/cyberdrop_dl/crawlers/kemono.py
@@ -167,7 +167,10 @@ def fallback_if_no_api(
class KemonoBaseCrawler(Crawler, is_abc=True):
SUPPORTED_PATHS: ClassVar[SupportedPaths] = {
"Model": "/<service>/user/<user_id>",
- "Favorites": "/favorites/<user_id>",
+ "Favorites": (
+ r"/favorites?type=post\|artist",
+ r"/account/favorites/posts\|artists",
+ ),
"Search": "/search?q=...",
"Individual Post": "/<service>/user/<user_id>/post/<post_id>",
"Direct links": (
@@ -220,7 +223,9 @@ class KemonoBaseCrawler(Crawler, is_abc=True):
return await self.post(scrape_item)
case [service, "user", _] if service in self.SERVICES:
return await self.profile(scrape_item)
- case ["favorites", _] if (type_ := scrape_item.url.query.get("type")) in ("post", "artist"):
+ case ["favorites"] if (type_ := scrape_item.url.query.get("type")) in ("post", "artist"):
+ return await self.favorites(scrape_item, type_)
+ case ["account", "favorites", slug] if (type_ := slug.removesuffix("s")) in ("post", "artist"):
return await self.favorites(scrape_item, type_)
case ["posts"] if search_query := scrape_item.url.query.get("q"):
return await self.search(scrape_item, search_query)