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

[8chan] dynamically generate 'TOS' cookie name

This commit is contained in:
Mike Fährmann 2024-09-28 11:04:27 +02:00
parent 4e9dd036e7
commit 0389575e0f
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -27,8 +27,10 @@ class _8chanExtractor(Extractor):
Extractor.__init__(self, match)
def _init(self):
self.cookies.set(
"TOS20240918", "1", domain=self.root.rpartition("/")[2])
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)
@memcache()
def cookies_prepare(self):