on master help sign in
[fix] indexing
commita8a0de644dd0ae0ebbaf3e202b1821f2d17262d9 authorAdam Tauber <asciimoo@gmail.com> dateFri 21 Mar 2014, 18:17 (13 years ago) parent01c2eeb
1 file changed+4−1
searx/engines/duckduckgo.py+4−1
searx/engines/duckduckgo.py+4−1
@@ -23,7 +23,10 @@ def response(resp):
2323 doc = fromstring(resp.text)
2424
2525 for r in doc.xpath(result_xpath):
26− res_url = r.xpath(url_xpath)[-1]
26+ try:
27+ res_url = r.xpath(url_xpath)[-1]
28+ except:
29+ continue
2730 if not res_url:
2831 continue
2932 title = html_to_text(''.join(r.xpath(title_xpath)))