summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-30 02:36:05 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-30 02:36:05 +0100
commit3dcb83591059699e32c1c00c0308b08a57c49048 (patch)
tree9fa3ce4398acd4c3108b8459a68bd14801146cce /searx/engines/xpath.py
parentc6280966f5c991bed650f39abc9b16933b0c103e (diff)
downloadsearxng-3dcb83591059699e32c1c00c0308b08a57c49048.tar.gz
searxng-3dcb83591059699e32c1c00c0308b08a57c49048.zip
[fix] function parameters
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index 14ca26158..0b50f88bb 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -37,7 +37,7 @@ def extract_text(xpath_results):
return html_to_text(xpath_results.text_content())
-def extract_url(xpath_results, search_url=search_url):
+def extract_url(xpath_results, search_url):
url = extract_text(xpath_results)
if url.startswith('//'):
@@ -86,7 +86,7 @@ def response(resp):
dom = html.fromstring(resp.text)
if results_xpath:
for result in dom.xpath(results_xpath):
- url = extract_url(result.xpath(url_xpath))
+ url = extract_url(result.xpath(url_xpath), search_url)
title = extract_text(result.xpath(title_xpath)[0])
content = extract_text(result.xpath(content_xpath)[0])
results.append({'url': url, 'title': title, 'content': content})