diff --git a/requirements.txt b/requirements.txt index 0d2f61b..029c0cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ pygments==2.1.3 pyopenssl==0.15.1 python-dateutil==2.5.3 pyyaml==3.11 -requests==2.10.0 +requests[socks]==2.10.0 diff --git a/searx/search.py b/searx/search.py index 6de07d2..c6d17eb 100644 --- a/searx/search.py +++ b/searx/search.py @@ -19,6 +19,7 @@ import gc import threading from thread import start_new_thread from time import time +from uuid import uuid4 import searx.poolrequests as requests_lib from searx.engines import ( categories, engines @@ -56,19 +57,20 @@ def search_request_wrapper(fn, url, engine_name, **kwargs): def threaded_requests(requests): timeout_limit = max(r[2]['timeout'] for r in requests) search_start = time() + search_id = uuid4().__str__() for fn, url, request_args, engine_name in requests: request_args['timeout'] = timeout_limit th = threading.Thread( target=search_request_wrapper, args=(fn, url, engine_name), kwargs=request_args, - name='search_request', + name=search_id, ) th._engine_name = engine_name th.start() for th in threading.enumerate(): - if th.name == 'search_request': + if th.name == search_id: remaining_time = max(0.0, timeout_limit - (time() - search_start)) th.join(remaining_time) if th.isAlive(): diff --git a/searx/settings.yml b/searx/settings.yml index b998e0c..8c552eb 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -25,7 +25,7 @@ outgoing: # communication with search engines pool_maxsize : 10 # Number of simultaneous requests by host # uncomment below section if you want to use a proxy # see http://docs.python-requests.org/en/latest/user/advanced/#proxies -# SOCKS proxies are not supported : see https://github.com/kennethreitz/requests/pull/478 +# SOCKS proxies are also supported: see http://docs.python-requests.org/en/master/user/advanced/#socks # proxies : # http : http://127.0.0.1:8080 # https: http://127.0.0.1:8080 diff --git a/searx/static/themes/oscar/css/logicodev.min.css b/searx/static/themes/oscar/css/logicodev.min.css index 195385b..bd58aa5 100644 Binary files a/searx/static/themes/oscar/css/logicodev.min.css and b/searx/static/themes/oscar/css/logicodev.min.css differ diff --git a/searx/static/themes/oscar/css/pointhi.min.css b/searx/static/themes/oscar/css/pointhi.min.css index 389add2..0c2472c 100644 Binary files a/searx/static/themes/oscar/css/pointhi.min.css and b/searx/static/themes/oscar/css/pointhi.min.css differ diff --git a/searx/static/themes/oscar/less/logicodev/results.less b/searx/static/themes/oscar/less/logicodev/results.less index 37a5a76..9e57da7 100644 --- a/searx/static/themes/oscar/less/logicodev/results.less +++ b/searx/static/themes/oscar/less/logicodev/results.less @@ -6,7 +6,7 @@ .favicon { margin-bottom:-3px; } - + a { color: @black; text-decoration: none; @@ -18,7 +18,7 @@ &:visited{ color: @violet; } - + .highlight { background-color: @dim-gray; // Chrome hack: bold is different size than normal @@ -64,10 +64,9 @@ float: left !important; width: 24%; margin: .5%; - a{ + a { display: block; width: 100%; - height: 170px; background-size: cover; } } @@ -148,3 +147,21 @@ color: @gray; background: transparent; } + +.result .text-muted small { + word-wrap: break-word; +} + +.modal-wrapper { + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); +} + +.modal-wrapper { + background-clip: padding-box; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + outline: 0 none; + position: relative; +} diff --git a/searx/static/themes/oscar/less/pointhi/results.less b/searx/static/themes/oscar/less/pointhi/results.less index b3d8700..beea353 100644 --- a/searx/static/themes/oscar/less/pointhi/results.less +++ b/searx/static/themes/oscar/less/pointhi/results.less @@ -6,10 +6,10 @@ .favicon { margin-bottom:-3px; } - + a { vertical-align: bottom; - + .highlight { font-weight:bold; } @@ -81,3 +81,21 @@ color: #AAA; background: #FFF; } + +.result .text-muted small { + word-wrap: break-word; +} + +.modal-wrapper { + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); +} + +.modal-wrapper { + background-clip: padding-box; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + outline: 0 none; + position: relative; +} diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 2d94ea6..812749c 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -6,7 +6,7 @@