[8chan] also set TOS cookie for the previous day
This commit is contained in:
@@ -29,8 +29,10 @@ class _8chanExtractor(Extractor):
|
|||||||
def _init(self):
|
def _init(self):
|
||||||
now = util.datetime_utcnow()
|
now = util.datetime_utcnow()
|
||||||
domain = self.root.rpartition("/")[2]
|
domain = self.root.rpartition("/")[2]
|
||||||
self.cookies.set("TOS20240928", "1", domain=domain)
|
self.cookies.set(
|
||||||
self.cookies.set(now.strftime("TOS%Y%m%d"), "1", domain=domain)
|
now.strftime("TOS%Y%m%d"), "1", domain=domain)
|
||||||
|
self.cookies.set(
|
||||||
|
(now - timedelta(1)).strftime("TOS%Y%m%d"), "1", domain=domain)
|
||||||
|
|
||||||
@memcache()
|
@memcache()
|
||||||
def cookies_prepare(self):
|
def cookies_prepare(self):
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ __tests__ = (
|
|||||||
"markdown" : str,
|
"markdown" : str,
|
||||||
"maxFileCount" : 5,
|
"maxFileCount" : 5,
|
||||||
"maxFileSize" : "32.00 MB",
|
"maxFileSize" : "32.00 MB",
|
||||||
"maxMessageLength": 8001,
|
"maxMessageLength": 12000,
|
||||||
"message" : str,
|
"message" : str,
|
||||||
"mime" : str,
|
"mime" : str,
|
||||||
"name" : "Anonymous",
|
"name" : "Anonymous",
|
||||||
@@ -73,7 +73,7 @@ __tests__ = (
|
|||||||
"#category": ("", "8chan", "board"),
|
"#category": ("", "8chan", "board"),
|
||||||
"#class" : _8chan._8chanBoardExtractor,
|
"#class" : _8chan._8chanBoardExtractor,
|
||||||
"#pattern" : _8chan._8chanThreadExtractor.pattern,
|
"#pattern" : _8chan._8chanThreadExtractor.pattern,
|
||||||
"#count" : range(24, 28),
|
"#count" : range(24, 32),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user