diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-01-09 11:21:46 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-01-09 11:21:46 +0100 |
commit | c8be128e97479ea6c871c4b6fbf014fa8136e708 (patch) | |
tree | d7a6e2edc80b1d05b27585eca0874ff5374895e6 /searx/engines/startpage.py | |
parent | 23b4a53248527a1228af13a7a4f7f380a08d1c09 (diff) | |
download | searxng-c8be128e97479ea6c871c4b6fbf014fa8136e708.tar.gz searxng-c8be128e97479ea6c871c4b6fbf014fa8136e708.zip |
[mod] ignore startpage unicode errors
Diffstat (limited to 'searx/engines/startpage.py')
-rw-r--r-- | searx/engines/startpage.py | 5 |
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): |