summaryrefslogtreecommitdiff
path: root/searx/engines/__init__.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-12 20:13:14 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-12 20:13:14 +0100
commita65070a72d1deecbcb5bd9a2905120d326a00527 (patch)
treee28f1bfad3fc9eb3c50a039aee718be2ab205ad9 /searx/engines/__init__.py
parent060ea4d2f54061f89a1846de4fbce82ff10c594c (diff)
downloadsearxng-a65070a72d1deecbcb5bd9a2905120d326a00527.tar.gz
searxng-a65070a72d1deecbcb5bd9a2905120d326a00527.zip
[enh] own useragent handling init
Diffstat (limited to 'searx/engines/__init__.py')
-rw-r--r--searx/engines/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 60fb5cf55..2bb0f4724 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -23,6 +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
import ConfigParser
import sys
from datetime import datetime
@@ -151,7 +152,8 @@ def search(query, request, selected_engines):
results = {}
suggestions = set()
number_of_searches += 1
- user_agent = request.headers.get('User-Agent', '')
+ #user_agent = request.headers.get('User-Agent', '')
+ user_agent = get_useragent()
for selected_engine in selected_engines:
if selected_engine['name'] not in engines: