on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx into boilerplate
147f40cMarkus Heiser
searx/engines/framalibre.py+4−1
@@ -10,7 +10,10 @@
10 @parse url, title, content, thumbnail, img_src
10 @parse url, title, content, thumbnail, img_src
11"""
11"""
12
12
13+try:
13−from cgi import escape
14+ from cgi import escape
15+except:
16+ from html import escape
14from lxml import html
17from lxml import html
15from searx.engines.xpath import extract_text
18from searx.engines.xpath import extract_text
16from searx.url_utils import urljoin, urlencode
19from searx.url_utils import urljoin, urlencode
searx/settings.yml+1−1
@@ -744,7 +744,7 @@ engines:
744 title_xpath : ./h2
744 title_xpath : ./h2
745 content_xpath : ./p[@class="s"]
745 content_xpath : ./p[@class="s"]
746 suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a
746 suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a
747− first_page_num : 1
747+ first_page_num : 0
748 page_size : 10
748 page_size : 10
749 disabled : True
749 disabled : True
750
750
searx/webapp.py+4−1
@@ -41,7 +41,10 @@ except:
41 logger.critical("cannot import dependency: pygments")
41 logger.critical("cannot import dependency: pygments")
42 from sys import exit
42 from sys import exit
43 exit(1)
43 exit(1)
44+try:
44−from cgi import escape
45+ from cgi import escape
46+except:
47+ from html import escape
45from datetime import datetime, timedelta
48from datetime import datetime, timedelta
46from time import time
49from time import time
47from werkzeug.contrib.fixers import ProxyFix
50from werkzeug.contrib.fixers import ProxyFix