diff options
Diffstat (limited to 'searx')
-rw-r--r-- | searx/__init__.py | 4 | ||||
-rw-r--r-- | searx/brand.py | 2 | ||||
-rw-r--r-- | searx/query.py | 2 | ||||
-rw-r--r-- | searx/settings.yml | 13 | ||||
-rw-r--r-- | searx/templates/oscar/macros.html | 2 | ||||
-rwxr-xr-x | searx/webapp.py | 5 |
6 files changed, 9 insertions, 19 deletions
diff --git a/searx/__init__.py b/searx/__init__.py index 9bbc7c8c3..08e67f69d 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -60,7 +60,3 @@ if 'SEARX_SECRET' in environ: settings['server']['secret_key'] = environ['SEARX_SECRET'] if 'SEARX_BIND_ADDRESS' in environ: settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS'] - -if not searx_debug and settings['server']['secret_key'] == 'ultrasecretkey': - logger.error('server.secret_key is not changed. Please use something else instead of ultrasecretkey.') - exit(1) diff --git a/searx/brand.py b/searx/brand.py index 0eaaf0be3..7fcab6fad 100644 --- a/searx/brand.py +++ b/searx/brand.py @@ -4,4 +4,4 @@ ISSUE_URL = 'https://github.com/searx/searx/issues' SEARX_URL = 'https://searx.me' DOCS_URL = 'https://searx.github.io/searx' PUBLIC_INSTANCES = 'https://searx.space' -CONTACT_URL = 'mailto:contact@example.com' +CONTACT_URL = '' diff --git a/searx/query.py b/searx/query.py index e61e24f2c..38cb03ffe 100644 --- a/searx/query.py +++ b/searx/query.py @@ -77,7 +77,7 @@ class RawTextQuery: pass # this force a language - if query_part[0] == ':': + if query_part[0] == ':' and len(query_part) > 1: lang = query_part[1:].lower().replace('_', '-') # check if any language-code is equal with diff --git a/searx/settings.yml b/searx/settings.yml index e263e3ad4..0a569e59c 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -492,7 +492,7 @@ engines: - name : library genesis engine : xpath search_url : http://libgen.rs/search.php?req={query} - url_xpath : //a[contains(@href,"bookfi.net")]/@href + url_xpath : //a[contains(@href,"bookfi.net/md5")]/@href title_xpath : //a[contains(@href,"book/")]/text()[1] content_xpath : //td/a[1][contains(@href,"=author")]/text() categories : general @@ -906,17 +906,6 @@ engines: # See : http://mymemory.translated.net/doc/usagelimits.php # api_key : '' - - name : voat - engine: xpath - shortcut: vo - categories: social media - search_url : https://searchvoat.co/?t={query} - url_xpath : //div[@class="entry"]//p[@class="title"]/a/@href - title_xpath : //div[@class="entry"]//p[@class="title"]/a/text() - content_xpath : //div[@class="entry"]//span[@class="domain"]/a/text() - timeout : 10.0 - disabled : True - - name : 1337x engine : 1337x shortcut : 1337x diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index f40eebd37..571242860 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -14,7 +14,7 @@ <!-- Draw result header --> {% macro result_header(result, favicons, id) -%} -<h4 class="result_header" id="result-{{id}}">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe, id=id) }}{% else %}{{ result.title|safe}}{% endif %}</h4> +<h4 class="result_header" id="result-{{id}}">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }}{% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe, id=id) }}{% else %}{{ result.title|safe}}{% endif %}</h4> {%- endmacro %} <!-- Draw result sub header --> diff --git a/searx/webapp.py b/searx/webapp.py index 5076355d0..49750d210 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -86,6 +86,11 @@ from searx.metrology.error_recorder import errors_per_engines from werkzeug.serving import WSGIRequestHandler WSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server'].get('http_protocol_version', '1.0')) +# check secret_key +if not searx_debug and settings['server']['secret_key'] == 'ultrasecretkey': + logger.error('server.secret_key is not changed. Please use something else instead of ultrasecretkey.') + exit(1) + # about static static_path = get_resources_directory(searx_dir, 'static', settings['ui']['static_path']) logger.debug('static directory is %s', static_path) |