on master help sign in
[mod] ignore startpage unicode errors
c8be128Adam Tauber
searx/engines/startpage.py+4−1
@@ -66,7 +66,10 @@ def response(resp):
66 continue
66 continue
67 link = links[0]
67 link = links[0]
68 url = link.attrib.get('href')
68 url = link.attrib.get('href')
69+ try:
69− title = escape(link.text_content())
70+ title = escape(link.text_content())
71+ except UnicodeDecodeError:
72+ continue
70
73
71 # block google-ad url's
74 # block google-ad url's
72 if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):
75 if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):