From 7e099068bcf4d428e6240410aebd692a3f429a72 Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Fri, 16 Feb 2024 11:03:51 -0700 Subject: [PATCH] Fix traceback (nugget caught in get) --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index da188150e..55894a6c5 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.71" \ No newline at end of file +__version__ = "5.1.72" \ 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 64b66ac66..8d252d489 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -35,7 +35,7 @@ async def fetch(self, scrape_item: ScrapeItem) -> None: await self.set_cookies() - if "get" in scrape_item.url.host: + if scrape_item.url.host.startswith("get"): scrape_item.url = await self.reinforced_link(scrape_item.url) scrape_item.url = await self.get_stream_link(scrape_item.url) @@ -167,7 +167,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|cdn-nugget|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}$" + cdn_possibilities = r"^(?:(?:(?:media-files|cdn|c|pizza|cdn-burger|cdn-nugget|burger|taquito|pizza|fries|meatballs|milkshake|kebab)[0-9]{0,2})|(?:(?:big-taco-|cdn-pizza|cdn-meatballs|cdn-milkshake|i.kebab|i.fries|i-nugget)[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 cecbcd543..0d8dc8971 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.71" +version = "5.1.72" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"