[tumblr] fix 'day' extractor

another bug caused by a383eca7
pull/4855/head
Mike Fährmann 10 months ago
parent c8c744a7c0
commit 7608201a44
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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):

Loading…
Cancel
Save