Skip to content

Commit

Permalink
[8chan] dynamically generate 'TOS' cookie name
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Sep 28, 2024
1 parent 4e9dd03 commit 0389575
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gallery_dl/extractor/8chan.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ def __init__(self, match):
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):
Expand Down

0 comments on commit 0389575

Please sign in to comment.