diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2014-03-21 18:17:13 +0100 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2014-03-21 18:17:13 +0100 |
| commit | a8a0de644dd0ae0ebbaf3e202b1821f2d17262d9 (patch) | |
| tree | c27a779ebd7368657f59a29cf571aa92be88220c /searx/engines/duckduckgo.py | |
| parent | 01c2eeb8ff055cfecdb8f1b38f284e95c483d5d9 (diff) | |
[fix] indexing
Diffstat (limited to 'searx/engines/duckduckgo.py')
| -rw-r--r-- | searx/engines/duckduckgo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 495a0cd23..ec2858e69 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -23,7 +23,10 @@ def response(resp): doc = fromstring(resp.text) for r in doc.xpath(result_xpath): - res_url = r.xpath(url_xpath)[-1] + try: + res_url = r.xpath(url_xpath)[-1] + except: + continue if not res_url: continue title = html_to_text(''.join(r.xpath(title_xpath))) |