diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 921a0bbf6..b20843111 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.53" \ No newline at end of file +__version__ = "5.1.54" \ No newline at end of file diff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py index 66fdc0492..7d555beb7 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -105,7 +105,16 @@ async def video(self, scrape_item: ScrapeItem) -> None: try: filename, ext = await get_filename_and_ext(link.name) except NoExtensionFailure: - filename, ext = await get_filename_and_ext(scrape_item.url.name) + try: + link_container = soup.select_one("source") + link = URL(link_container.get('src')) + filename, ext = await get_filename_and_ext(link.name) + except Exception as e: + if "get" in link.host: + link = await self.reinforced_link(link) + filename, ext = await get_filename_and_ext(link.name) + else: + filename, ext = await get_filename_and_ext(scrape_item.url.name) await self.handle_file(link, scrape_item, filename, ext) @@ -127,6 +136,18 @@ async def other(self, scrape_item: ScrapeItem) -> None: await self.handle_file(link, scrape_item, filename, ext) + @error_handling_wrapper + async def reinforced_link(self, url: URL) -> URL: + """Gets the download link for a given reinforced URL""" + """get.bunkr.su""" + async with self.request_limiter: + soup = await self.client.get_BS4(self.domain, url) + + link_container = soup.select("a[class*=bg-blue-500]")[-1] + link = URL(link_container.get('href')) + + return link + """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""" async def get_stream_link(self, url: URL) -> URL: diff --git a/pyproject.toml b/pyproject.toml index 3a4e4fd54..5c6dc61a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.53" +version = "5.1.54" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"