summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-11-18 11:37:42 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-11-18 11:37:42 +0100
commitaba65369d2d55b337939d004b06d6ff10f8519b9 (patch)
tree0197b53f95679a4a95fa1f5e96b39b7c54748034 /searx/utils.py
parentb1234ee88947f2ce61a7df361c706622a3ec2a32 (diff)
downloadsearxng-aba65369d2d55b337939d004b06d6ff10f8519b9.tar.gz
searxng-aba65369d2d55b337939d004b06d6ff10f8519b9.zip
[enh] make version of searx readable
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 7764291fc..47980bd36 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -3,6 +3,9 @@ from codecs import getincrementalencoder
from HTMLParser import HTMLParser
from random import choice
+from searx.version import VERSION_STRING
+from searx import settings
+
import cStringIO
import csv
import os
@@ -21,7 +24,8 @@ def gen_useragent():
def searx_useragent():
- return 'searx'
+ return 'searx/{searx_version} {suffix}'.format(searx_version=VERSION_STRING,
+ suffix=settings['server'].get('useragent_suffix', ''))
def highlight_content(content, query):