Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
idk. Things man.
Jules-WinnfieldXad67eba603b6
diff --git a/README.md b/README.mdindex ee67cd9ff..980e2cfbe 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 4.0.18+The latest version of the program is 4.0.19Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. On top of this it also downloads from different domains simultaneously.diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.pyindex 06f7c0416..90c3a54a8 100644--- a/cyberdrop_dl/__init__.py+++ b/cyberdrop_dl/__init__.py@@ -1 +1 @@-__version__ = "4.0.18"+__version__ = "4.0.19"diff --git a/cyberdrop_dl/client/client.py b/cyberdrop_dl/client/client.pyindex 49d8f907b..67ca3aad5 100644--- a/cyberdrop_dl/client/client.py+++ b/cyberdrop_dl/client/client.py@@ -133,7 +133,6 @@ class DownloadSession:raise DownloadFailure(code=503, message="Bunkr under maintenance")if 'text' in content_type.lower() or 'html' in content_type.lower():logger.debug("Server for %s is experiencing issues, you are being ratelimited, or cookies have expired", str(media.url))- await File_Lock.remove_lock(original_filename)raise DownloadFailure(code=resp.status, message="Unexpectedly got text as response")total = int(resp.headers.get('Content-Length', str(0))) + resume_point@@ -160,7 +159,6 @@ class DownloadSession:raise DownloadFailure(code=503, message="Bunkr under maintenance")if 'text' in content_type.lower() or 'html' in content_type.lower():logger.debug("Server for %s is experiencing issues, you are being ratelimited, or cookies have expired", str(media.url))- await File_Lock.remove_lock(original_filename)raise DownloadFailure(code=resp.status, message="Unexpectedly got text as response")total = int(resp.headers.get('Content-Length', str(0))) + resume_pointdiff --git a/cyberdrop_dl/downloader/downloaders.py b/cyberdrop_dl/downloader/downloaders.pyindex ccb997b3d..ca78ce847 100644--- a/cyberdrop_dl/downloader/downloaders.py+++ b/cyberdrop_dl/downloader/downloaders.py@@ -174,17 +174,18 @@ class Downloader:if self.block_sub_folders:album = album.split('/')[0]+ original_filename = media.filename+try:- while await self.File_Lock.check_lock(media.filename):+ while await self.File_Lock.check_lock(original_filename):await asyncio.sleep(gauss(1, 1.5))- await self.File_Lock.add_lock(media.filename)+ await self.File_Lock.add_lock(original_filename)if url_path not in self.current_attempt:self.current_attempt[url_path] = 0current_throttle = self.client.throttle- original_filename = media.filenamecomplete_file = (self.download_dir / album / media.filename)partial_file = complete_file.with_suffix(complete_file.suffix + '.part')