Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: assume `download` if URLs are provided

NTFSvolume7f47c990e9cd
diff --git a/cyberdrop_dl/config/__init__.py b/cyberdrop_dl/config/__init__.py
index 494461dcf..604e3bbd6 100644
--- a/cyberdrop_dl/config/__init__.py
+++ b/cyberdrop_dl/config/__init__.py
@@ -217,7 +217,17 @@ def _load_yaml(file: Path) -> dict[str, Any]:
def parse_tokens(tokens: Iterable[str] | str | None) -> list[str]:
- return [ALIASES.get(token, token) for token in normalize_tokens(tokens)]
+ tokens = [ALIASES.get(token, token) for token in normalize_tokens(tokens)]
+ if not (tokens and tokens[0].startswith(("https://", "http://"))):
+ return tokens
+
+ cmd = "download"
+ logger.warning(
+ "URL provided as first argument. Assuming '%s' command. Run the proper command ('%s') to suppress this warning",
+ cmd,
+ "cyberdrop-dl download <URLS> [<OPTIONS>]",
+ )
+ return [cmd, *tokens]
def _resolve_paths(model: BaseModel) -> None: