[mod] ignore startpage unicode errors
commitc8be128e97479ea6c871c4b6fbf014fa8136e708
authorAdam Tauber <asciimoo@gmail.com>
dateFri 9 Jan 2015, 11:21 (12 years ago)
parent23b4a53
searx/engines/startpage.py+4−1
@@ -66,7 +66,10 @@ def response(resp):
6666 continue
6767 link = links[0]
6868 url = link.attrib.get('href')
69− title = escape(link.text_content())
69+ try:
70+ title = escape(link.text_content())
71+ except UnicodeDecodeError:
72+ continue
7073
7174 # block google-ad url's
7275 if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):