summaryrefslogtreecommitdiff
path: root/searx/engines/startpage.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-01-09 11:21:46 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-01-09 11:21:46 +0100
commitc8be128e97479ea6c871c4b6fbf014fa8136e708 (patch)
treed7a6e2edc80b1d05b27585eca0874ff5374895e6 /searx/engines/startpage.py
parent23b4a53248527a1228af13a7a4f7f380a08d1c09 (diff)
downloadsearxng-c8be128e97479ea6c871c4b6fbf014fa8136e708.tar.gz
searxng-c8be128e97479ea6c871c4b6fbf014fa8136e708.zip
[mod] ignore startpage unicode errors
Diffstat (limited to 'searx/engines/startpage.py')
-rw-r--r--searx/engines/startpage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
index 16da728cd..70b193952 100644
--- a/searx/engines/startpage.py
+++ b/searx/engines/startpage.py
@@ -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):