From 9cd3017dcb35b69574339b3a7ce3896da656e1a4 Mon Sep 17 00:00:00 2001 From: a01200356 Date: Sun, 27 Dec 2015 22:39:55 -0600 Subject: [PATCH 1/3] Disable engine by default. --- searx/settings.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/searx/settings.yml b/searx/settings.yml index 1c8ba3f7f..e23e4c390 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -300,11 +300,13 @@ engines: engine : vimeo shortcut : vm - - name : wolframalpha - shortcut : wa - engine : wolframalpha_api - api_key: '5952JX-X52L3VKWT8' - timeout: 6.0 +# You can use the engine using the official stable API, but you need an API key +# See : http://products.wolframalpha.com/api/ +# - name : wolframalpha +# shortcut : wa +# engine : wolframalpha_api +# api_key: 'apikey' # required! +# timeout: 6.0 #The blekko technology and team have joined IBM Watson! -> https://blekko.com/ # - name : blekko images From 0bb403bb4740d20c8a158fef622919dcd30e6e69 Mon Sep 17 00:00:00 2001 From: a01200356 Date: Mon, 28 Dec 2015 01:24:26 -0600 Subject: [PATCH 2/3] More fixes (Travis again). forfuckssaketravisnotagain --- searx/engines/wolframalpha_api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/searx/engines/wolframalpha_api.py b/searx/engines/wolframalpha_api.py index 309608628..d61d25747 100644 --- a/searx/engines/wolframalpha_api.py +++ b/searx/engines/wolframalpha_api.py @@ -10,8 +10,6 @@ from urllib import urlencode from lxml import etree -from searx.engines.xpath import extract_text -from searx.utils import html_to_text # search-url base_url = 'http://api.wolframalpha.com/v2/query' From 35a2bc5650b09d46c4b3a6b2c99ee521a09ef73f Mon Sep 17 00:00:00 2001 From: misnyo Date: Tue, 29 Dec 2015 19:16:26 +0100 Subject: [PATCH 3/3] [fix] #471 #463 fix old openssl(<1.0.2) requests verify error --- searx/__init__.py | 8 ++++++++ versions.cfg | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/searx/__init__.py b/searx/__init__.py index ea21e8f13..76038a443 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -15,9 +15,11 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. (C) 2013- by Adam Tauber, ''' +import certifi import logging from os import environ from os.path import realpath, dirname, join, abspath +from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION try: from yaml import load except: @@ -47,4 +49,10 @@ else: logger = logging.getLogger('searx') +# Workaround for openssl versions <1.0.2 +# https://github.com/certifi/python-certifi/issues/26 +if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2): + environ['REQUESTS_CA_BUNDLE'] = certifi.old_where() + logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION)) + logger.info('Initialisation done') diff --git a/versions.cfg b/versions.cfg index 6aad7a744..2cb86aba1 100644 --- a/versions.cfg +++ b/versions.cfg @@ -35,7 +35,7 @@ pyopenssl = 0.15.1 ndg-httpsclient = 0.4.0 pyasn1 = 0.1.8 pyasn1-modules = 0.0.6 -certifi = 2015.04.28 +certifi = 2015.11.20.1 cffi = 1.1.2 cryptography = 0.9.1