logo

searx

My custom branche(s) on searx, a meta-search engine
commit: c8be128e97479ea6c871c4b6fbf014fa8136e708
parent: 23b4a53248527a1228af13a7a4f7f380a08d1c09
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Fri,  9 Jan 2015 11:21:46 +0100

[mod] ignore startpage unicode errors

Diffstat:

Msearx/engines/startpage.py5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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):