Skip to content

Bulk asynchronous downloader for multiple file hosts

Check if name key is in current attempt before trying to pop.

Jules-WinnfieldX910b23a2b5fc
diff --git a/README.md b/README.md
index e65f92753..40ca9babb 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# `cyberdrop-dl`
**Bulk downloader for multiple file hosts**
-The latest version of the program is 3.6.4
+The latest version of the program is 3.6.5
<a href="https://www.buymeacoffee.com/juleswinnft" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index be798a71c..7c34d0c7a 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "3.6.4"
+__version__ = "3.6.5"
diff --git a/cyberdrop_dl/client/downloaders.py b/cyberdrop_dl/client/downloaders.py
index e78c0b46d..fea4942a3 100644
--- a/cyberdrop_dl/client/downloaders.py
+++ b/cyberdrop_dl/client/downloaders.py
@@ -239,7 +239,8 @@ class Downloader:
temp_file.rename(complete_file)
await self.SQL_helper.sql_update_file(db_path, filename, 1)
- self.current_attempt.pop(url.parts[-1])
+ if url.parts[-1] in self.current_attempt.keys():
+ self.current_attempt.pop(url.parts[-1])
logger.debug("Finished " + filename)
async def get_filename(self, url: URL, referral: URL, session: DownloadSession):
@@ -329,7 +330,8 @@ class Downloader:
if hasattr(e, "rescrape"):
if not (self.current_attempt[url.parts[-1]] >= self.attempts - 1) and e.rescrape:
return
- self.current_attempt.pop(url.parts[-1])
+ if url.parts[-1] in self.current_attempt.keys():
+ self.current_attempt.pop(url.parts[-1])
await log(f"\nError attempting {url}")
await log(sys.exc_info())
if hasattr(e, "message"):