From 50c836864a9a7a765561d886b11f44d8cea0bce9 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 5 Aug 2018 10:55:42 +0200 Subject: fetch_firefox_version.py : compatible with Python 3 and minor fixes. --- 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 f457284e3..dfa22c5fc 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -54,8 +54,8 @@ def searx_useragent(): suffix=settings['outgoing'].get('useragent_suffix', '')) -def gen_useragent(): - return str(useragents['ua'].format(os=choice(useragents['os']), version=choice(useragents['versions']))) +def gen_useragent(os=None): + return str(useragents['ua'].format(os=os or choice(useragents['os']), version=choice(useragents['versions']))) def highlight_content(content, query): -- cgit v1.2.3