From 75b276f408487db8fecc6eab7abd6126323a7efe Mon Sep 17 00:00:00 2001 From: Marc Abonce Seguin Date: Sun, 20 May 2018 18:10:22 -0500 Subject: fix bing "garbage" results (issue #1275) --- searx/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/utils.py') diff --git a/searx/utils.py b/searx/utils.py index 77c392909..eccbaaf19 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -57,9 +57,9 @@ blocked_tags = ('script', 'style') -def gen_useragent(): +def gen_useragent(os=None): # TODO - return ua.format(os=choice(ua_os), version=choice(ua_versions)) + return ua.format(os=os or choice(ua_os), version=choice(ua_versions)) def searx_useragent(): -- cgit v1.2.3 From c7000cd1df6d8f9aaa787515a6eca16f8a083715 Mon Sep 17 00:00:00 2001 From: Marc Abonce Seguin Date: Sat, 23 Jun 2018 16:24:06 -0500 Subject: [fix] update user agent versions this fixes duckduckgo error response --- searx/utils.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'searx/utils.py') diff --git a/searx/utils.py b/searx/utils.py index 1ec45ed6e..3b2e39919 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -39,14 +39,15 @@ else: logger = logger.getChild('utils') -ua_versions = ('40.0', - '41.0', - '42.0', - '43.0', - '44.0', - '45.0', - '46.0', - '47.0') +ua_versions = ('52.8.1', + '53.0', + '54.0', + '55.0', + '56.0', + '57.0', + '58.0', + '59.0', + '60.0.2') ua_os = ('Windows NT 6.3; WOW64', 'X11; Linux x86_64', -- cgit v1.2.3