From 49dd6baad507232293ac3bc541b70951c7a5884d Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Fri, 8 Mar 2024 15:14:41 -0700 Subject: [PATCH] Fix check-album status (not being awaited) --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py | 7 ++----- cyberdrop_dl/scraper/crawlers/erome_crawler.py | 4 ++-- cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py | 2 +- cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py | 2 +- pyproject.toml | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 8d1bc7fab..60937d52a 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.1.94" \ No newline at end of file +__version__ = "5.1.95" \ 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 36c4655d2..8ad6de3a5 100644 --- a/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/bunkrr_crawler.py @@ -86,13 +86,10 @@ async def album(self, scrape_item: ScrapeItem) -> None: if "no-image" in src.name: raise FileNotFoundError("No image found, reverting to parent") - - album_check = await self.check_album_results(src, results) - if album_check: - continue filename, ext = await get_filename_and_ext(src.name) - await self.handle_file(src, new_scrape_item, filename, ext) + if not await self.check_album_results(src, results): + await self.handle_file(src, new_scrape_item, filename, ext) except FileNotFoundError: self.manager.task_group.create_task(self.run(ScrapeItem(link, scrape_item.parent_title, True, album_id, date))) diff --git a/cyberdrop_dl/scraper/crawlers/erome_crawler.py b/cyberdrop_dl/scraper/crawlers/erome_crawler.py index 907513719..041a15f5f 100644 --- a/cyberdrop_dl/scraper/crawlers/erome_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/erome_crawler.py @@ -72,11 +72,11 @@ async def album(self, scrape_item: ScrapeItem) -> None: for image in images: link = URL(image['data-src']) filename, ext = await get_filename_and_ext(link.name) - if not self.check_album_results(link, results): + if not await self.check_album_results(link, results): await self.handle_file(link, scrape_item, filename, ext) for video in vidoes: link = URL(video['src']) filename, ext = await get_filename_and_ext(link.name) - if not self.check_album_results(link, results): + if not await self.check_album_results(link, results): await self.handle_file(link, scrape_item, filename, ext) diff --git a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py index 7b8eb071c..9987b74cb 100644 --- a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py @@ -96,7 +96,7 @@ async def album(self, scrape_item: ScrapeItem) -> None: for link in links: link = URL(link.get('src')) new_scrape_item = await self.create_scrape_item(scrape_item, link, title, True, album_id) - if not self.check_album_results(link, results): + if not await self.check_album_results(link, results): await self.handle_direct_link(new_scrape_item) link_next = soup.select_one('a[data-pagination=next]') diff --git a/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py b/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py index d80ab25a1..47bb3539a 100644 --- a/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/pixeldrain_crawler.py @@ -50,7 +50,7 @@ async def folder(self, scrape_item: ScrapeItem) -> None: date = await self.parse_datetime(file['date_upload'].replace("T", " ").split(".")[0].strip("Z")) filename, ext = await get_filename_and_ext(file['name']) new_scrape_item = await self.create_scrape_item(scrape_item, link, title, True, None, date) - if not self.check_album_results(link, results): + if not await self.check_album_results(link, results): await self.handle_file(link, new_scrape_item, filename, ext) @error_handling_wrapper diff --git a/pyproject.toml b/pyproject.toml index 2a551300e..6f80c5f71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.1.94" +version = "5.1.95" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"