From cd9bb791c155b8094b29e5db755e6c0412c37966 Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Thu, 18 Apr 2024 13:53:32 -0600 Subject: [PATCH] try except for key error in coomer crawler --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/crawlers/coomer_crawler.py | 5 ++++- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 4786b4120..cbc58fa9c 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.2.33" +__version__ = "5.2.34" diff --git a/cyberdrop_dl/scraper/crawlers/coomer_crawler.py b/cyberdrop_dl/scraper/crawlers/coomer_crawler.py index 02711dede..35b994600 100644 --- a/cyberdrop_dl/scraper/crawlers/coomer_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/coomer_crawler.py @@ -96,7 +96,10 @@ async def handle_file(file_obj): @error_handling_wrapper async def handle_direct_link(self, scrape_item: ScrapeItem) -> None: """Handles a direct link""" - filename, ext = await get_filename_and_ext(scrape_item.url.query["f"]) + try: + filename, ext = await get_filename_and_ext(scrape_item.url.query["f"]) + except KeyError: + filename, ext = await get_filename_and_ext(scrape_item.url.name) await self.handle_file(scrape_item.url, scrape_item, filename, ext) """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""" diff --git a/pyproject.toml b/pyproject.toml index b7d403feb..a2a34eab0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.2.33" +version = "5.2.34" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"