From fdd4ee590fcbb39de242b6c20d0353a64ad294f0 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 31 Mar 2021 09:50:13 -0400 Subject: [PATCH 1/2] Hotfix: Set EU consent cookie to pending for all requests See discussion on #243 --- app/request.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/request.py b/app/request.py index 00e2ce0..446d844 100644 --- a/app/request.py +++ b/app/request.py @@ -210,6 +210,12 @@ class Request: 'User-Agent': self.modified_user_agent } + # FIXME: Should investigate this further to ensure the consent + # view is suppressed correctly + cookies = { + 'CONSENT': 'PENDING+999' + } + # Validate Tor conn and request new identity if the last one failed if self.tor and not send_tor_signal( Signal.NEWNYM if attempt > 0 else Signal.HEARTBEAT): @@ -233,7 +239,8 @@ class Request: response = requests.get( base_url + query, proxies=self.proxies, - headers=headers) + headers=headers, + cookies=cookies) # Retry query with new identity if using Tor (max 10 attempts) if 'form id="captcha-form"' in response.text and self.tor: From b57c86a1d0896c7b8612d1fbe3e3b51d56b0cfd9 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 2 Apr 2021 12:57:15 -0400 Subject: [PATCH 2/2] Bump version to 0.3.2 --- app/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index ace1c4d..13350a1 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -14,7 +14,7 @@ app.default_key_set = generate_user_keys() app.no_cookie_ips = [] app.config['SECRET_KEY'] = os.urandom(32) app.config['SESSION_TYPE'] = 'filesystem' -app.config['VERSION_NUMBER'] = '0.3.1' +app.config['VERSION_NUMBER'] = '0.3.2' app.config['APP_ROOT'] = os.getenv( 'APP_ROOT', os.path.dirname(os.path.abspath(__file__))) diff --git a/setup.py b/setup.py index ef0c673..fdd7684 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( author='Ben Busby', author_email='benbusby@protonmail.com', name='whoogle-search', - version='0.3.1', + version='0.3.2', include_package_data=True, install_requires=requirements, description='Self-hosted, ad-free, privacy-respecting metasearch engine',