Commit 147f40c3 authored by Markus Heiser's avatar Markus Heiser

Merge branch 'master' of https://github.com/asciimoo/searx into boilerplate

parents 62a4b744 8721be2f
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
@parse url, title, content, thumbnail, img_src @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 lxml import html
from searx.engines.xpath import extract_text from searx.engines.xpath import extract_text
from searx.url_utils import urljoin, urlencode from searx.url_utils import urljoin, urlencode
......
...@@ -744,7 +744,7 @@ engines: ...@@ -744,7 +744,7 @@ engines:
title_xpath : ./h2 title_xpath : ./h2
content_xpath : ./p[@class="s"] content_xpath : ./p[@class="s"]
suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a 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 page_size : 10
disabled : True disabled : True
......
...@@ -41,7 +41,10 @@ except: ...@@ -41,7 +41,10 @@ except:
logger.critical("cannot import dependency: pygments") logger.critical("cannot import dependency: pygments")
from sys import exit from sys import exit
exit(1) exit(1)
from cgi import escape try:
from cgi import escape
except:
from html import escape
from datetime import datetime, timedelta from datetime import datetime, timedelta
from time import time from time import time
from werkzeug.contrib.fixers import ProxyFix from werkzeug.contrib.fixers import ProxyFix
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment