1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[tumblr] fix 'day' extractor

another bug caused by a383eca7
This commit is contained in:
Mike Fährmann 2023-11-25 00:51:14 +01:00
parent c8c744a7c0
commit 7608201a44
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -322,12 +322,15 @@ class TumblrDayExtractor(TumblrExtractor):
def __init__(self, match):
TumblrExtractor.__init__(self, match)
year, month, day = match.group(4).split("/")
self.date_min = (
# 719163 == date(1970, 1, 1).toordinal()
date(int(year), int(month), int(day)).toordinal() - 719163) * 86400
self.ordinal = date(int(year), int(month), int(day)).toordinal()
def _init(self):
TumblrExtractor._init(self)
self.date_min = (
# 719163 == date(1970, 1, 1).toordinal()
(self.ordinal - 719163) * 86400)
self.api.before = self.date_min + 86400
def posts(self):