Skip to content

Bulk asynchronous downloader for multiple file hosts

Fixed weird bunkr issue with the json not loading.

Jules-WinnfieldX3d2e87522910
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 943ca0bc7..92a2c9aab 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "3.3.24"
+__version__ = "3.3.25"
diff --git a/cyberdrop_dl/crawlers/Bunkr_Spider.py b/cyberdrop_dl/crawlers/Bunkr_Spider.py
index bf03a23d6..aaed11518 100644
--- a/cyberdrop_dl/crawlers/Bunkr_Spider.py
+++ b/cyberdrop_dl/crawlers/Bunkr_Spider.py
@@ -32,10 +32,13 @@ class BunkrCrawler:
try:
soup = await session.get_BS4(url)
build_id = json.loads(soup.select_one("script[id=__NEXT_DATA__]").get_text())
-
- json_fetch = URL("https://" + url.host + "/_next/data/" + build_id['buildId'] + url.path + '.json')
- text = await session.get_text(json_fetch)
- json_obj = json.loads(text)['pageProps']
+ try:
+ files = build_id['props']['pageProps']['album']['files']
+ json_obj = build_id['props']['pageProps']
+ except KeyError:
+ json_fetch = URL("https://" + url.host + "/_next/data/" + build_id['buildId'] + url.path + '.json')
+ text = await session.get_text(json_fetch)
+ json_obj = json.loads(text)['pageProps']
title = await make_title_safe(json_obj['album']['name'])
for file in json_obj['album']['files']:
ext = '.' + file['name'].split('.')[-1].lower()