Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Fix empty link check
Jules-WinnfieldX0871c77ffd1a
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.pyindex 1c622223b..565443f86 100644--- a/cyberdrop_dl/__init__.py+++ b/cyberdrop_dl/__init__.py@@ -1 +1 @@-__version__ = "2.10.0"+__version__ = "2.10.1"diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.pyindex 546cfd40d..460c73fb6 100644--- a/cyberdrop_dl/main.py+++ b/cyberdrop_dl/main.py@@ -44,10 +44,12 @@ async def download_all(args: argparse.Namespace):content_object = await scrape(links, args.include_id)# TODO return unsupported links, instead of raising error when no links in content object, print unsupported and# exit- if not content_object:- logging.error(f'ValueError No links: {content_object}')- raise ValueError('No links found, check the URL.txt\nIf the link works in your web browser, '- 'please open an issue ticket with me.')+ if content_object.is_empty():+ logging.error(f'ValueError No links')+ log('No links found, check the URL.txt\nIf the link works in your web browser, '+ 'please open an issue ticket with me.', Fore.RED)+ log("This program does not currently support password protected albums", Fore.RED)+ exit(0)clear()downloaders = get_downloaders(content_object, folder=Path(args.output_folder),attempts=args.attempts, threads=args.threads)diff --git a/cyberdrop_dl/utils/data_classes.py b/cyberdrop_dl/utils/data_classes.pyindex 3f7df80ea..f27e9ba17 100644--- a/cyberdrop_dl/utils/data_classes.py+++ b/cyberdrop_dl/utils/data_classes.py@@ -78,3 +78,11 @@ class CascadeItem:def add_cookie(self, cookie: List[Dict]):self.cookies.add_cookies(cookie)++ def is_empty(self):+ for domain_str, domain in self.domains.items():+ for album_str, album in domain.albums.items():+ if album.link_pairs:+ return False+ return True+