diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 349f38a99..4c1383ab3 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.63" \ No newline at end of file +__version__ = "5.1.64" \ No newline at end of file diff --git a/cyberdrop_dl/downloader/downloader.py b/cyberdrop_dl/downloader/downloader.py index 002b55783..b6316c926 100644 --- a/cyberdrop_dl/downloader/downloader.py +++ b/cyberdrop_dl/downloader/downloader.py @@ -32,11 +32,12 @@ async def wrapper(self, *args, **kwargs): while True: try: return await f(self, *args, **kwargs) - except InvalidContentTypeFailure: + except InvalidContentTypeFailure as e: media_item = args[0] if not isinstance(media_item.download_task_id, Field): await self.manager.progress_manager.file_progress.remove_file(media_item.download_task_id) await log(f"Download Failed: {media_item.url} received Invalid Content", 40) + await log(e.message, 40) await self.manager.progress_manager.download_stats_progress.add_failure("Invalid Content Type") await self.manager.progress_manager.download_progress.add_failed() break diff --git a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py index 7d555beb7..7fcd5daa7 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -132,11 +132,14 @@ async def other(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) + 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) - @error_handling_wrapper async def reinforced_link(self, url: URL) -> URL: """Gets the download link for a given reinforced URL""" """get.bunkr.su""" @@ -152,7 +155,7 @@ async def reinforced_link(self, url: URL) -> URL: async def get_stream_link(self, url: URL) -> URL: """Gets the stream link for a given url""" - cdn_possibilities = r"^(?:(?:(?:media-files|cdn|c|pizza|cdn-burger)[0-9]{0,2})|(?:(?:big-taco-|cdn-pizza|cdn-meatballs|cdn-milkshake|meatballs|i.kebab|i.fries)[0-9]{0,2}(?:redir)?))\.bunkr?\.[a-z]{2,3}$" + cdn_possibilities = r"^(?:(?:(?:media-files|cdn|c|pizza|cdn-burger|burger|taquito|pizza|fries|meatballs|milkshake|kebab)[0-9]{0,2})|(?:(?:big-taco-|cdn-pizza|cdn-meatballs|cdn-milkshake|i.kebab|i.fries)[0-9]{0,2}(?:redir)?))\.bunkr?\.[a-z]{2,3}$" if not re.match(cdn_possibilities, url.host): return url diff --git a/pyproject.toml b/pyproject.toml index 7495fc4e8..2e492ef76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.63" +version = "5.1.64" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"