瀏覽代碼

[fix] function parameters

asciimoo 11 年之前
父節點
當前提交
3dcb835910
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      searx/engines/xpath.py

+ 2
- 2
searx/engines/xpath.py 查看文件

37
         return html_to_text(xpath_results.text_content())
37
         return html_to_text(xpath_results.text_content())
38
 
38
 
39
 
39
 
40
-def extract_url(xpath_results, search_url=search_url):
40
+def extract_url(xpath_results, search_url):
41
     url = extract_text(xpath_results)
41
     url = extract_text(xpath_results)
42
 
42
 
43
     if url.startswith('//'):
43
     if url.startswith('//'):
86
     dom = html.fromstring(resp.text)
86
     dom = html.fromstring(resp.text)
87
     if results_xpath:
87
     if results_xpath:
88
         for result in dom.xpath(results_xpath):
88
         for result in dom.xpath(results_xpath):
89
-            url = extract_url(result.xpath(url_xpath))
89
+            url = extract_url(result.xpath(url_xpath), search_url)
90
             title = extract_text(result.xpath(title_xpath)[0])
90
             title = extract_text(result.xpath(title_xpath)[0])
91
             content = extract_text(result.xpath(content_xpath)[0])
91
             content = extract_text(result.xpath(content_xpath)[0])
92
             results.append({'url': url, 'title': title, 'content': content})
92
             results.append({'url': url, 'title': title, 'content': content})