on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx into boilerplate
commit147f40c386f9427ddf6038fe86ba601c98f77dcd authorMarkus Heiser <markus.heiser@darmarit.de> dateThu 28 Nov 2019, 20:38 (7 years ago) parent62a4b748721be2
3 files changed+9−3
searx/engines/framalibre.py+4−1 searx/settings.yml+1−1 searx/webapp.py+4−1
searx/engines/framalibre.py+4−1
@@ -10,7 +10,10 @@
1010 @parse url, title, content, thumbnail, img_src
1111"""
1212
13−from cgi import escape
13+try:
14+ from cgi import escape
15+except:
16+ from html import escape
1417from lxml import html
1518from searx.engines.xpath import extract_text
1619from searx.url_utils import urljoin, urlencode
searx/settings.yml+1−1
@@ -744,7 +744,7 @@ engines:
744744 title_xpath : ./h2
745745 content_xpath : ./p[@class="s"]
746746 suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a
747− first_page_num : 1
747+ first_page_num : 0
748748 page_size : 10
749749 disabled : True
750750
searx/webapp.py+4−1
@@ -41,7 +41,10 @@ except:
4141 logger.critical("cannot import dependency: pygments")
4242 from sys import exit
4343 exit(1)
44−from cgi import escape
44+try:
45+ from cgi import escape
46+except:
47+ from html import escape
4548from datetime import datetime, timedelta
4649from time import time
4750from werkzeug.contrib.fixers import ProxyFix