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

Commit

Permalink
Add fix for e-hentai date missing seconds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 6, 2023
1 parent eb9db2d commit c67e812
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cyberdrop_dl/scraper/crawlers/ehentai_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,7 @@ async def image(self, scrape_item: ScrapeItem) -> None:

async def parse_datetime(self, date: str) -> int:
"""Parses a datetime string into a unix timestamp"""
if date.count(":") == 1:
date = date + ":00"
date = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S")
return calendar.timegm(date.timetuple())

0 comments on commit c67e812

Please sign in to comment.