Merge pull request #1745 from lorddavidiii/python3.8-fix

Fix python 3.8 compatibility
This commit is contained in:
Adam Tauber 2019-11-28 19:31:59 +00:00 committed by GitHub
commit 789d71350d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,10 @@
@parse url, title, content, thumbnail, img_src
"""
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

View File

@ -41,7 +41,10 @@ except:
logger.critical("cannot import dependency: pygments")
from sys import exit
exit(1)
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