You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
searxng/searx
Markus Heiser 9328c66e93 [fix] google news - send CONSENT Cookie to not be redirected
In the EU there exists a "General Data Protection Regulation" [1] aka GDPR (BTW:
very user friendly!) which requires consent to tracking.  To get the consent
from the user, google-news requests are redirected to confirm and get a CONSENT
Cookie from https://consent.google.de/s?continue=...

This patch adds a CONSENT Cookie to the google-news request to avoid
redirection.

The behavior of the CONTENTS cookies over all google engines seems similar but
the pattern is not yet fully clear to me, here are some random samples from my
analysis ..

Using common google search from different domains::

    google.com:        CONSENT=YES+cb.{{date}}-14-p0.de+FX+816
    google.de:         CONSENT=YES+cb.{{date}}-14-p0.de+FX+333
    google.fr:         CONSENT=YES+srp.gws-{{date}}-0-RC2.fr+FX+826

When searching about videos (google-videos)::

    google.es:         CONSENT=YES+srp.gws-{{date}}-0-RC2.es+FX+076
    google.de:         CONSENT=YES+srp.gws-{{date}}-0-RC2.de+FX+171

Google news has only one domain for all languages::

    news.google.com:   CONSENT=YES+cb.{{date}}-14-p0.de+FX+816

Using google-scholar search from different domains::

    scholar.google.de: CONSENT=YES+cb.{{date}}-14-p0.de+FX+333
    scholar.google.fr: does not use such a cookie / did not ask the user
    scholar.google.es: does not use such a cookie / did not ask the user

Interim summary:

  Pattern is unclear and I won't apply the CONSENT cookie to all google engines.
  More experience is need before we generalize the CONSENT cookies over all
  google engines.

Related:

- e9a6ab401 [fix] youtube - send CONSENT Cookie to not be redirected
- https://github.com/benbusby/whoogle-search/issues/311
- https://github.com/benbusby/whoogle-search/issues/243

[1] https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
..
answerers
data [pylint] searx/data/__init__.py 3 years ago
engines [fix] google news - send CONSENT Cookie to not be redirected 3 years ago
metrics
network [mod] move all default settings into searx.settings_defaults 3 years ago
plugins [mod] oscar theme: /preferences : HTML detail order match visual tabs 3 years ago
raise_for_httperror
search [fix] typo: online_dictionnary --> online_dictionary 3 years ago
shared
static [mod] make node.clean: call the "clean" script from the packages.json 3 years ago
templates [mod] oscar theme: /preferences : HTML detail order match visual tabs 3 years ago
translations
__init__.py [mod] move hook to set Unix thread name into searx.unixthreadname 3 years ago
autocomplete.py
exceptions.py
external_bang.py
external_urls.py [enh] openstreetmap / map template: improve results 3 years ago
flaskfix.py [mod] refactor: move Flask proxy fix to searx.flaskfix module 3 years ago
languages.py
preferences.py [mod] move all default settings into searx.settings_defaults 3 years ago
query.py
results.py
settings.yml [fix] typo in a searx/settings.yml 3 years ago
settings_defaults.py [pylint] searx/__init__.py & searx/settings_defaults.py 3 years ago
settings_loader.py
settings_robot.yml [yamllint] searx/settings_robot.yml 3 years ago
testing.py
unixthreadname.py [mod] move hook to set Unix thread name into searx.unixthreadname 3 years ago
utils.py [fix] strip spaces from searx user agent 3 years ago
version.py
webadapter.py
webapp.py [coding-style] searx/webapp.py - normalize indentations 3 years ago
webutils.py [mod] move all default settings into searx.settings_defaults 3 years ago