From aa4afe44d3d5064e3ef0a30b0e5c20be0b714134 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 18 May 2021 10:50:22 -0400 Subject: [PATCH] Use current date to format EU consent cookie --- app/request.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/request.py b/app/request.py index 78b262a..9239b6e 100644 --- a/app/request.py +++ b/app/request.py @@ -1,4 +1,5 @@ from app.models.config import Config +from datetime import datetime import xml.etree.ElementTree as ET import random import requests @@ -216,8 +217,11 @@ class Request: # FIXME: Should investigate this further to ensure the consent # view is suppressed correctly + now = datetime.now() cookies = { - 'CONSENT': 'YES+cb.20210514-17-p0.de+F+678' + 'CONSENT': 'YES+cb.{:d}{:02d}{:02d}-17-p0.de+F+678'.format( + now.year, now.month, now.day + ) } # Validate Tor conn and request new identity if the last one failed