Browse Source

Merge branch 'master' into wolframalpha

a01200356 9 years ago
parent
commit
d4b6ab2be4
3 changed files with 16 additions and 6 deletions
  1. 8
    0
      searx/__init__.py
  2. 7
    5
      searx/settings.yml
  3. 1
    1
      versions.cfg

+ 8
- 0
searx/__init__.py View File

15
 (C) 2013- by Adam Tauber, <asciimoo@gmail.com>
15
 (C) 2013- by Adam Tauber, <asciimoo@gmail.com>
16
 '''
16
 '''
17
 
17
 
18
+import certifi
18
 import logging
19
 import logging
19
 from os import environ
20
 from os import environ
20
 from os.path import realpath, dirname, join, abspath
21
 from os.path import realpath, dirname, join, abspath
22
+from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
21
 try:
23
 try:
22
     from yaml import load
24
     from yaml import load
23
 except:
25
 except:
47
 
49
 
48
 logger = logging.getLogger('searx')
50
 logger = logging.getLogger('searx')
49
 
51
 
52
+# Workaround for openssl versions <1.0.2
53
+# https://github.com/certifi/python-certifi/issues/26
54
+if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
55
+    environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
56
+    logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
57
+
50
 logger.info('Initialisation done')
58
 logger.info('Initialisation done')

+ 7
- 5
searx/settings.yml View File

300
     engine : vimeo
300
     engine : vimeo
301
     shortcut : vm
301
     shortcut : vm
302
 
302
 
303
-  - name : wolframalpha
304
-    shortcut : wa
305
-    engine : wolframalpha_api
306
-    api_key: '5952JX-X52L3VKWT8'
307
-    timeout: 6.0
303
+# You can use the engine using the official stable API, but you need an API key
304
+# See : http://products.wolframalpha.com/api/
305
+#  - name : wolframalpha
306
+#    shortcut : wa
307
+#    engine : wolframalpha_api
308
+#    api_key: 'apikey' # required!
309
+#    timeout: 6.0
308
 
310
 
309
 #The blekko technology and team have joined IBM Watson! -> https://blekko.com/
311
 #The blekko technology and team have joined IBM Watson! -> https://blekko.com/
310
 #  - name : blekko images
312
 #  - name : blekko images

+ 1
- 1
versions.cfg View File

35
 ndg-httpsclient = 0.4.0
35
 ndg-httpsclient = 0.4.0
36
 pyasn1 = 0.1.8
36
 pyasn1 = 0.1.8
37
 pyasn1-modules = 0.0.6
37
 pyasn1-modules = 0.0.6
38
-certifi = 2015.04.28
38
+certifi = 2015.11.20.1
39
 
39
 
40
 cffi = 1.1.2
40
 cffi = 1.1.2
41
 cryptography = 0.9.1
41
 cryptography = 0.9.1