summaryrefslogtreecommitdiff
path: root/searx/engines/startpage.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-24 09:35:27 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-24 09:35:27 +0100
commit85b81be35b9b53848431da2a4ab8d531990cf963 (patch)
treed0e97c66eb0c57932a1ca228d0b12746090a7a80 /searx/engines/startpage.py
parent99688d2c8e08ba579b67c31181489485f56c92d6 (diff)
downloadsearxng-85b81be35b9b53848431da2a4ab8d531990cf963.tar.gz
searxng-85b81be35b9b53848431da2a4ab8d531990cf963.zip
[fix] pep8
Diffstat (limited to 'searx/engines/startpage.py')
-rw-r--r--searx/engines/startpage.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
index 5a6c570d1..1b48baa8d 100644
--- a/searx/engines/startpage.py
+++ b/searx/engines/startpage.py
@@ -4,6 +4,7 @@ from lxml import html
base_url = None
search_url = None
+
def request(query, params):
global search_url
query = urlencode({'q': query})[2:]
@@ -24,10 +25,10 @@ def response(resp):
url = link.attrib.get('href')
title = link.text_content()
- content =''
+ content = ''
if len(result.xpath('./p[@class="desc"]')):
content = result.xpath('./p[@class="desc"]')[0].text_content()
-
+
results.append({'url': url, 'title': title, 'content': content})
-
+
return results