Browse Source

[fix] indexing

Adam Tauber 11 years ago
parent
commit
a8a0de644d
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      searx/engines/duckduckgo.py

+ 4
- 1
searx/engines/duckduckgo.py View File

23
     doc = fromstring(resp.text)
23
     doc = fromstring(resp.text)
24
 
24
 
25
     for r in doc.xpath(result_xpath):
25
     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
27
         if not res_url:
30
         if not res_url:
28
             continue
31
             continue
29
         title = html_to_text(''.join(r.xpath(title_xpath)))
32
         title = html_to_text(''.join(r.xpath(title_xpath)))