summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmanage3
-rw-r--r--searx/engines/google_images.py5
-rw-r--r--searx/static/themes/simple/gruntfile.js6
-rw-r--r--src/brand/searxng-wordmark.svg (renamed from searx/static/themes/simple/src/svg/searxng-wordmark.svg)0
4 files changed, 10 insertions, 4 deletions
diff --git a/manage b/manage
index 494c8174f..ec8e13c0a 100755
--- a/manage
+++ b/manage
@@ -706,10 +706,9 @@ themes.oscar() {
}
themes.simple() {
- local src="searx/static/themes/simple/src"
local static="searx/static/themes/simple"
( set -e
- convert_if_newer "$src/svg/searxng-wordmark.svg" "$static/img/favicon.png" \
+ convert_if_newer "src/brand/searxng-wordmark.svg" "$static/img/favicon.png" \
-transparent white -resize 64x64
build_msg GRUNT "theme: simple"
npm --prefix searx/static/themes/simple run build
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index ffdd6675e..61d291e3f 100644
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -172,7 +172,10 @@ def response(resp):
thumbnail_src = ''
link_node = eval_xpath_getindex(img_node, '../../../a[2]', 0)
- url = eval_xpath_getindex(link_node, '@href', 0)
+ url = eval_xpath_getindex(link_node, '@href', 0, None)
+ if url is None:
+ logger.error("missing @href in node: %s", html.tostring(link_node))
+ continue
pub_nodes = eval_xpath(link_node, './div/div')
pub_descr = img_alt
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
index 3d72a9270..006d64417 100644
--- a/searx/static/themes/simple/gruntfile.js
+++ b/searx/static/themes/simple/gruntfile.js
@@ -5,6 +5,10 @@ module.exports = function(grunt) {
const path = require('path');
grunt.initConfig({
+
+ _brand: '../../../../src/brand',
+ _templates: '../../../templates',
+
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
@@ -102,7 +106,7 @@ module.exports = function(grunt) {
svgo: ['--config', 'svg4web.svgo.js']
},
files: {
- '../../../templates/__common__/searxng-wordmark.min.svg': 'src/svg/searxng-wordmark.svg'
+ '<%= _templates %>/__common__/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg'
}
}
},
diff --git a/searx/static/themes/simple/src/svg/searxng-wordmark.svg b/src/brand/searxng-wordmark.svg
index b94fe3728..b94fe3728 100644
--- a/searx/static/themes/simple/src/svg/searxng-wordmark.svg
+++ b/src/brand/searxng-wordmark.svg