mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 02:22:22 +02:00
commit
18e7d60702
8 changed files with 25 additions and 12 deletions
|
@ -29,10 +29,6 @@ def request(query, params):
|
|||
params['url'] = search_url.format(search_term=quote(query),
|
||||
pageno=params['pageno']-1)
|
||||
|
||||
# FIX: SSLError: hostname 'btdigg.org'
|
||||
# doesn't match either of 'ssl2000.cloudflare.com', 'cloudflare.com', '*.cloudflare.com'
|
||||
params['verify'] = False
|
||||
|
||||
return params
|
||||
|
||||
|
||||
|
|
|
@ -34,10 +34,6 @@ def request(query, params):
|
|||
params['url'] = search_url.format(search_term=quote(query),
|
||||
pageno=params['pageno'])
|
||||
|
||||
# FIX: SSLError: hostname 'kickass.so'
|
||||
# doesn't match either of '*.kickass.to', 'kickass.to'
|
||||
params['verify'] = False
|
||||
|
||||
return params
|
||||
|
||||
|
||||
|
|
|
@ -41,9 +41,6 @@ def request(query, params):
|
|||
# using searx User-Agent
|
||||
params['headers']['User-Agent'] = searx_useragent()
|
||||
|
||||
# FIX: SSLError: SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
|
||||
params['verify'] = False
|
||||
|
||||
return params
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ class TestKickassEngine(SearxTestCase):
|
|||
self.assertIn('url', params)
|
||||
self.assertIn(query, params['url'])
|
||||
self.assertIn('kickass.to', params['url'])
|
||||
self.assertIn('verify', params)
|
||||
self.assertFalse(params['verify'])
|
||||
|
||||
def test_response(self):
|
||||
|
|
|
@ -65,6 +65,16 @@ from searx.query import Query
|
|||
from searx.autocomplete import searx_bang, backends as autocomplete_backends
|
||||
from searx.plugins import plugins
|
||||
|
||||
# check if the pyopenssl, ndg-httpsclient, pyasn1 packages are installed.
|
||||
# They are needed for SSL connection without trouble, see #298
|
||||
try:
|
||||
import OpenSSL.SSL # NOQA
|
||||
import ndg.httpsclient # NOQA
|
||||
import pyasn1 # NOQA
|
||||
except ImportError:
|
||||
logger.critical("The pyopenssl, ndg-httpsclient, pyasn1 packages have to be installed.\n"
|
||||
"Some HTTPS connections will failed")
|
||||
|
||||
|
||||
static_path, templates_path, themes =\
|
||||
get_themes(settings['themes_path']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue