Skip to content

Bulk asynchronous downloader for multiple file hosts

Fix bunkr downloading.

Jules62958b266c1c
diff --git a/utils/downloaders.py b/utils/downloaders.py
index d17799360..9f9e53b53 100644
--- a/utils/downloaders.py
+++ b/utils/downloaders.py
@@ -197,6 +197,7 @@ class LimitDownloader(Downloader):
@staticmethod
def bunkr_parse(url: str) -> str:
"""Fix the URL for bunkr.is and construct the headers."""
+ """No Longer in use with latest bunkr changes to use cdn for images and media-files for videos"""
extension = '.' + url.split('.')[-1]
if extension.lower() in FILE_FORMATS['Videos']:
changed_url = url.replace('cdn.bunkr', 'stream.bunkr').split('/')
@@ -223,8 +224,8 @@ class LimitDownloader(Downloader):
headers: Optional[CaseInsensitiveDict] = None,
show_progress: bool = True
):
- if 'bunkr' in url:
- url = self.bunkr_parse(url)
+ # if 'bunkr' in url:
+ # url = self.bunkr_parse(url)
await super().download_file(url, referal=referal, filename=filename, session=session, headers=headers, show_progress=show_progress)
async def download_all(
diff --git a/utils/scrapers.py b/utils/scrapers.py
index 5b4a3a36b..aa97695f7 100644
--- a/utils/scrapers.py
+++ b/utils/scrapers.py
@@ -114,7 +114,7 @@ class ChibisafeSpider(Spider):
def individual_bunkr_video(self, response):
netloc = urlparse(response.url).netloc.replace('www.', '')
- yield {'netloc': netloc, 'url': response.url.replace('stream.bunkr.is/v/', 'cdn.bunkr.is/'), 'title': "Chibisafe Loose Files", 'referal': response.url, 'cookies': ''}
+ yield {'netloc': netloc, 'url': response.url.replace('stream.bunkr.is/v/', 'media-files.bunkr.is/'), 'title': "Chibisafe Loose Files", 'referal': response.url, 'cookies': ''}
def parse(self, response, **kwargs):
links = response.css('a[class=image]::attr(href)').getall()