Skip to content

Commit

Permalink
refactor: use a custom filename
Browse files Browse the repository at this point in the history
  • Loading branch information
NTFSvolume committed Jan 2, 2025
1 parent 8b76e02 commit 12d8cd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cyberdrop_dl/scraper/crawlers/ehentai_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ async def image(self, scrape_item: ScrapeItem) -> None:
image = soup.select_one("img[id=img]")
link = URL(image.get("src"))
filename, ext = get_filename_and_ext(link.name)
await self.handle_file(link, scrape_item, filename, ext)
custom_filename, _ = get_filename_and_ext(f"{scrape_item.url.name}{ext}")
await self.handle_file(link, scrape_item, filename, ext, custom_filename=custom_filename)

"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""

Expand Down

0 comments on commit 12d8cd0

Please sign in to comment.