From e03fe8f3bc60841019ff17312bfb2b78fe10d6fd Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Sat, 4 May 2024 22:37:12 -0600 Subject: [PATCH] Fix bunkr reinforced for zips. --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py | 7 +++++-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 3a525246f..f7b814bc3 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.2.52" +__version__ = "5.2.53" diff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py index 5b53b054f..a5e28324c 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -157,8 +157,11 @@ async def reinforced_link(self, url: URL) -> URL: """get.bunkr.su""" async with self.request_limiter: soup = await self.client.get_BS4(self.domain, url) - - link_container = soup.select('a[download*=""]')[-1] + + try: + link_container = soup.select('a[download*=""]')[-1] + except IndexError: + link_container = soup.select('a[class*=download]')[-1] link = URL(link_container.get('href')) return link diff --git a/pyproject.toml b/pyproject.toml index f05333d81..0891bbea3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.2.52" +version = "5.2.53" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"