Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: remove Nekohouse support (#1803)
NTFSvolumef073f3f5b8f5
diff --git a/cyberdrop_dl/crawlers/crawler.py b/cyberdrop_dl/crawlers/crawler.pyindex 13ff623f9..94ee66a0f 100644--- a/cyberdrop_dl/crawlers/crawler.py+++ b/cyberdrop_dl/crawlers/crawler.py@@ -241,7 +241,7 @@ class Crawler(HTTPClientProxy, HLSParser, ABC):cls.SUPPORTED_PATHS = _sort_supported_paths(cls.SUPPORTED_PATHS) # pyright: ignore[reportConstantRedefinition]cls.IS_ABC: bool = is_abc- add_to_register = bool(not is_debug or (is_debug and env.ENABLE_DEBUG_CRAWLERS))+ add_to_registry = bool(not is_debug or (is_debug and env.ENABLE_DEBUG_CRAWLERS))if db_path:cls.__db_path__ = staticmethod(_DB_PATH_BUILDERS[db_path])@@ -249,12 +249,12 @@ class Crawler(HTTPClientProxy, HLSParser, ABC):if cls.IS_GENERIC:cls.SCRAPE_MAPPER_KEYS = ()cls.INFO: CrawlerInfo = CrawlerInfo.generic(cls.NAME, cls.SUPPORTED_PATHS)- if add_to_register:+ if add_to_registry:Registry.generic.add(cls)returnif is_abc:- if add_to_register:+ if add_to_registry:Registry.abc.add(cls)return@@ -278,7 +278,7 @@ class Crawler(HTTPClientProxy, HLSParser, ABC):supported_domains=_make_wiki_supported_domains(cls.SCRAPE_MAPPER_KEYS),supported_paths=cls.SUPPORTED_PATHS,)- if add_to_register:+ if add_to_registry:Registry.concrete.add(cls)@finaldiff --git a/cyberdrop_dl/crawlers/nekohouse.py b/cyberdrop_dl/crawlers/nekohouse.pyindex 960cf8708..2c24a55f8 100644--- a/cyberdrop_dl/crawlers/nekohouse.py+++ b/cyberdrop_dl/crawlers/nekohouse.py@@ -1,14 +1,17 @@from __future__ import annotations-from typing import ClassVar+from typing import TYPE_CHECKING, ClassVarfrom cyberdrop_dl.url_objects import AbsoluteHttpURLfrom .kemono import KemonoBaseCrawler+if TYPE_CHECKING:+ from cyberdrop_dl.crawlers.crawler import SupportedPaths-class NekohouseCrawler(KemonoBaseCrawler):- SUPPORTED_PATHS: ClassVar[dict[str, str]] = {++class NekohouseCrawler(KemonoBaseCrawler, is_debug=True):+ SUPPORTED_PATHS: ClassVar[SupportedPaths] = {"Model": "/<service>/user/<user_id>","Individual Post": "/<service>/user/<user_id>/post/<post_id>","Direct links": "/(data|thumbnails)/...",@@ -18,7 +21,6 @@ class NekohouseCrawler(KemonoBaseCrawler):SERVICES = "fanbox", "fantia", "fantia_products", "subscribestar", "twitter"async def __async_post_init__(self) -> None:- await super().async_startup()-+ await super().__async_post_init__()# Only this API endpoint is availableawait self._get_usernames(self.PRIMARY_URL / "api/creators")