1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[mod] ignore startpage unicode errors

This commit is contained in:
Adam Tauber 2015-01-09 11:21:46 +01:00
parent 23b4a53248
commit c8be128e97

View File

@ -66,7 +66,10 @@ def response(resp):
continue
link = links[0]
url = link.attrib.get('href')
title = escape(link.text_content())
try:
title = escape(link.text_content())
except UnicodeDecodeError:
continue
# block google-ad url's
if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):