diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py index 9af24de3b..72120304e 100644 --- a/searx/engines/xpath.py +++ b/searx/engines/xpath.py @@ -1,7 +1,7 @@ from lxml import html from urllib import urlencode, unquote from urlparse import urlparse, urljoin -from lxml.etree import _ElementStringResult +from lxml.etree import _ElementStringResult, _ElementUnicodeResult from searx.utils import html_to_text search_url = None @@ -29,7 +29,7 @@ def extract_text(xpath_results): for e in xpath_results: result = result + extract_text(e) return result - elif type(xpath_results) == _ElementStringResult: + elif type(xpath_results) in [_ElementStringResult, _ElementUnicodeResult]: # it's a string return ''.join(xpath_results) else: diff --git a/searx/settings.yml b/searx/settings.yml index 7a32c629c..f13d5e8c4 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -21,7 +21,7 @@ engines: engine : bing_news locale : en-US shortcut : bin - + - name : currency engine : currency_convert categories : general @@ -69,7 +69,7 @@ engines: - name : google news engine : google_news shortcut : gon - + - name : piratebay engine : piratebay categories : videos, music, files @@ -124,7 +124,7 @@ engines: - name : yahoo news engine : yahoo_news shortcut : yhn - + - name : youtube engine : youtube categories : videos @@ -150,3 +150,4 @@ locales: de : Deutsch hu : Magyar fr : Français + es : Español diff --git a/searx/static/css/style.css b/searx/static/css/style.css index a99e4cda0..4b2d3c36d 100644 --- a/searx/static/css/style.css +++ b/searx/static/css/style.css @@ -165,6 +165,8 @@ tr:hover { background: #DDDDDD; } #suggestions span { display: block; margin: 0 2px 2px 2px; padding: 0; } #suggestions form { display: block; } #suggestions input { padding: 2px 6px; margin: 2px 4px; font-size: 0.8em; display: inline-block; background: #3498DB; color: #FFFFFF; border-radius: 4px; border: 0; cursor: pointer; } +#search_url { margin-top: 8px; } +#search_url input { border: 1px solid #888888; padding: 4px; color: #444444; width: 20em; display: block; margin: 4px; } #preferences { top: 10px; diff --git a/searx/templates/about.html b/searx/templates/about.html index 1fb15c2d9..c2ba7f5a6 100644 --- a/searx/templates/about.html +++ b/searx/templates/about.html @@ -2,9 +2,9 @@ {% block content %} {% include 'github_ribbon.html' %}
-

About searx

+

About searx

-

Searx is a metasearch engine, aggregating the results of other search engines while not storing information about its users. +

Searx is a metasearch engine, aggregating the results of other search engines while not storing information about its users.

Why use Searx?

{% endblock %} diff --git a/searx/templates/base.html b/searx/templates/base.html index 683ed4ed3..d1892245b 100644 --- a/searx/templates/base.html +++ b/searx/templates/base.html @@ -6,19 +6,19 @@ {% block title %}{% endblock %}searx - + {% block styles %} {% endblock %} {% block head %} - + {% endblock %}
{% block content %} {% endblock %} - +
diff --git a/searx/templates/github_ribbon.html b/searx/templates/github_ribbon.html index 92862f6b5..bdd9cf180 100644 --- a/searx/templates/github_ribbon.html +++ b/searx/templates/github_ribbon.html @@ -1,3 +1,3 @@ - Fork me on GitHub + Fork me on GitHub diff --git a/searx/templates/index.html b/searx/templates/index.html index 18320ae09..57b67ef09 100644 --- a/searx/templates/index.html +++ b/searx/templates/index.html @@ -4,8 +4,8 @@

searx

{% include 'search.html' %}

- {{ _('about') }} - {{ _('preferences') }} + {{ _('about') }} + {{ _('preferences') }}

{% endblock %} diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html index dc33c5dfa..5632accd2 100644 --- a/searx/templates/preferences.html +++ b/searx/templates/preferences.html @@ -4,7 +4,7 @@

{{ _('Preferences') }}

-
+
{{ _('Default categories') }}

@@ -66,6 +66,6 @@

- +
{% endblock %} diff --git a/searx/templates/results.html b/searx/templates/results.html index 34195c866..8094e96b6 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block title %}{{ q }} - {% endblock %} {% block content %} -
preferences
+
preferences
@@ -10,18 +10,22 @@ {% if suggestions %}
{{ _('Suggestions') }} {% for suggestion in suggestions %} -
- + +
{% endfor %}
{% endif %} +
+ {{ _('Search URL') }}: + +
{{ _('Download results') }} {% for output_type in ('csv', 'json', 'rss') %} -
+
@@ -48,7 +52,7 @@ {% if paging %}