summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2019-11-28 20:38:29 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2019-11-28 20:38:29 +0100
commit147f40c386f9427ddf6038fe86ba601c98f77dcd (patch)
tree6932f847c57c250443bd5ac0aef2143e19eb1eb0
parent62a4b7443fab7ea5d9deaa11b8ea06f0bdb26069 (diff)
parent8721be2f7d37b314b2ce01c29b3fbd6dc03aa3aa (diff)
Merge branch 'master' of https://github.com/asciimoo/searx into boilerplate
-rw-r--r--searx/engines/framalibre.py5
-rw-r--r--searx/settings.yml2
-rw-r--r--searx/webapp.py5
3 files changed, 9 insertions, 3 deletions
diff --git a/searx/engines/framalibre.py b/searx/engines/framalibre.py
index 146cdaeec..f3441fa5f 100644
--- a/searx/engines/framalibre.py
+++ b/searx/engines/framalibre.py
@@ -10,7 +10,10 @@
@parse url, title, content, thumbnail, img_src
"""
-from cgi import escape
+try:
+ from cgi import escape
+except:
+ from html import escape
from lxml import html
from searx.engines.xpath import extract_text
from searx.url_utils import urljoin, urlencode
diff --git a/searx/settings.yml b/searx/settings.yml
index 835fbe5f6..0384052c1 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -744,7 +744,7 @@ engines:
title_xpath : ./h2
content_xpath : ./p[@class="s"]
suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a
- first_page_num : 1
+ first_page_num : 0
page_size : 10
disabled : True
diff --git a/searx/webapp.py b/searx/webapp.py
index 3bb29140a..183bf1975 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -41,7 +41,10 @@ except:
logger.critical("cannot import dependency: pygments")
from sys import exit
exit(1)
-from cgi import escape
+try:
+ from cgi import escape
+except:
+ from html import escape
from datetime import datetime, timedelta
from time import time
from werkzeug.contrib.fixers import ProxyFix