1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[8chan] also set TOS cookie for the previous day

This commit is contained in:
Mike Fährmann 2024-10-10 18:19:37 +02:00
parent 2818973981
commit 51ceb33b6c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 6 additions and 4 deletions

View File

@ -29,8 +29,10 @@ class _8chanExtractor(Extractor):
def _init(self):
now = util.datetime_utcnow()
domain = self.root.rpartition("/")[2]
self.cookies.set("TOS20240928", "1", domain=domain)
self.cookies.set(now.strftime("TOS%Y%m%d"), "1", domain=domain)
self.cookies.set(
now.strftime("TOS%Y%m%d"), "1", domain=domain)
self.cookies.set(
(now - timedelta(1)).strftime("TOS%Y%m%d"), "1", domain=domain)
@memcache()
def cookies_prepare(self):

View File

@ -30,7 +30,7 @@ __tests__ = (
"markdown" : str,
"maxFileCount" : 5,
"maxFileSize" : "32.00 MB",
"maxMessageLength": 8001,
"maxMessageLength": 12000,
"message" : str,
"mime" : str,
"name" : "Anonymous",
@ -73,7 +73,7 @@ __tests__ = (
"#category": ("", "8chan", "board"),
"#class" : _8chan._8chanBoardExtractor,
"#pattern" : _8chan._8chanThreadExtractor.pattern,
"#count" : range(24, 28),
"#count" : range(24, 32),
},
{