From 046e1907213ac6317deec045735a0ca36ec8a136 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sat, 18 Jan 2014 21:53:59 +0100 Subject: [PATCH] [mod] function name --- searx/engines/__init__.py | 4 ++-- searx/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index 2bb0f4724..36857253a 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -23,7 +23,7 @@ from itertools import izip_longest, chain from operator import itemgetter from urlparse import urlparse from searx import settings -from searx.utils import get_useragent +from searx.utils import gen_useragent import ConfigParser import sys from datetime import datetime @@ -153,7 +153,7 @@ def search(query, request, selected_engines): suggestions = set() number_of_searches += 1 #user_agent = request.headers.get('User-Agent', '') - user_agent = get_useragent() + user_agent = gen_useragent() for selected_engine in selected_engines: if selected_engine['name'] not in engines: diff --git a/searx/utils.py b/searx/utils.py index 862185922..416055dfa 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -5,7 +5,7 @@ import codecs import cStringIO import re -def get_useragent(): +def gen_useragent(): # TODO return "Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"