mirror of
https://github.com/searxng/searxng.git
synced 2024-08-23 06:30:35 +02:00
[mod] ignore startpage unicode errors
This commit is contained in:
parent
23b4a53248
commit
c8be128e97
@ -66,7 +66,10 @@ def response(resp):
|
|||||||
continue
|
continue
|
||||||
link = links[0]
|
link = links[0]
|
||||||
url = link.attrib.get('href')
|
url = link.attrib.get('href')
|
||||||
|
try:
|
||||||
title = escape(link.text_content())
|
title = escape(link.text_content())
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
continue
|
||||||
|
|
||||||
# block google-ad url's
|
# block google-ad url's
|
||||||
if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):
|
if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):
|
||||||
|
Loading…
Reference in New Issue
Block a user