add test for 'Extractor.initialize()' (#4359)
This commit is contained in:
@@ -114,8 +114,7 @@ class MangahereMangaExtractor(MangahereBase, MangaExtractor):
|
||||
("https://m.mangahere.co/manga/aria/"),
|
||||
)
|
||||
|
||||
def __init__(self, match):
|
||||
MangaExtractor.__init__(self, match)
|
||||
def _init(self):
|
||||
self.cookies.set("isAdult", "1", domain="www.mangahere.cc")
|
||||
|
||||
def chapters(self, page):
|
||||
|
||||
@@ -442,10 +442,13 @@ class TumblrDayExtractor(TumblrExtractor):
|
||||
def __init__(self, match):
|
||||
TumblrExtractor.__init__(self, match)
|
||||
year, month, day = match.group(4).split("/")
|
||||
self.date_min = ts = (
|
||||
self.date_min = (
|
||||
# 719163 == date(1970, 1, 1).toordinal()
|
||||
date(int(year), int(month), int(day)).toordinal() - 719163) * 86400
|
||||
self.api.before = ts + 86400
|
||||
|
||||
def _init(self):
|
||||
TumblrExtractor._init(self)
|
||||
self.api.before = self.date_min + 86400
|
||||
|
||||
def posts(self):
|
||||
return self.api.posts(self.blog, {})
|
||||
|
||||
Reference in New Issue
Block a user