Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Fix omegascan chapter downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 18, 2024
1 parent cd9bb79 commit 5d1e6f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.34"
__version__ = "5.2.35"
20 changes: 1 addition & 19 deletions cyberdrop_dl/scraper/crawlers/omegascans_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 5d1e6f3

Please sign in to comment.