Skip to content

Bulk asynchronous downloader for multiple file hosts

Work around for fs-05 cyberdrop

Jules-WinnfieldX49990f58853e
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index b919eea5b..2882f63c5 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "2.24.4"
+__version__ = "2.24.5"
diff --git a/cyberdrop_dl/utils/downloaders.py b/cyberdrop_dl/utils/downloaders.py
index 7eb4ef509..7b40f3a98 100644
--- a/cyberdrop_dl/utils/downloaders.py
+++ b/cyberdrop_dl/utils/downloaders.py
@@ -38,6 +38,12 @@ def retry(f):
raise
logger.debug(f'Retrying ({self.current_attempt[str(args[0])]}) {args[0]}...')
self.current_attempt[str(args[0])] += 1
+
+ if 'cyberdrop' in args[0].host:
+ args = list(args)
+ args[0] = URL(str(args[0]).replace('fs-05.', 'fs-04.'))
+ args = tuple(args)
+
await asyncio.sleep(2)
return wrapper
@@ -82,6 +88,7 @@ class Downloader:
"""Download the content of given URL"""
if str(url) not in self.current_attempt.keys():
self.current_attempt[str(url)] = 0
+
headers = {'Referer': str(referral), 'user-agent': user_agent}
# return if completed already