From 5d1e6f3d410d227a1bc875e9895d365bad13e944 Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Thu, 18 Apr 2024 14:04:20 -0600 Subject: [PATCH] Fix omegascan chapter downloads --- cyberdrop_dl/__init__.py | 2 +- .../scraper/crawlers/omegascans_crawler.py | 20 +------------------ pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index cbc58fa9c..30b54ae4c 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.2.34" +__version__ = "5.2.35" diff --git a/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py b/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py index 4740cfb22..17dd4e85b 100644 --- a/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/omegascans_crawler.py @@ -30,29 +30,11 @@ async def fetch(self, scrape_item: ScrapeItem) -> None: if "chapter" in scrape_item.url.name: await self.chapter(scrape_item) - elif "series" in scrape_item.url.parts: - await self.series(scrape_item) else: await self.handle_direct_link(scrape_item) await self.scraping_progress.remove_task(task_id) - @error_handling_wrapper - async def series(self, scrape_item: ScrapeItem) -> None: - """Scrapes an album""" - async with self.request_limiter: - soup = await self.client.get_BS4(self.domain, scrape_item.url) - - chapters = soup.select("a[class*=text-gray-50]") - for chapter in chapters: - chapter_path = chapter.get("href") - if chapter_path.startswith("/"): - chapter_path = self.primary_base_domain / chapter_path[1:] - else: - chapter_path = URL(chapter_path) - new_scrape_item = await self.create_scrape_item(scrape_item, chapter_path, "", True) - self.manager.task_group.create_task(self.run(new_scrape_item)) - @error_handling_wrapper async def chapter(self, scrape_item: ScrapeItem) -> None: """Scrapes an image""" @@ -70,7 +52,7 @@ async def chapter(self, scrape_item: ScrapeItem) -> None: await scrape_item.add_to_parent_title(series_title) await scrape_item.add_to_parent_title(chapter_title) - date = soup.select_one('h2[class="font-semibold font-sans text-gray-400 text-xs"]').get_text() + date = soup.select('h2[class="font-semibold font-sans text-muted-foreground text-xs"]')[-1].get_text() try: date = await self.parse_datetime_standard(date) except ValueError: diff --git a/pyproject.toml b/pyproject.toml index a2a34eab0..3a3a74c0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.2.34" +version = "5.2.35" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"