summaryrefslogtreecommitdiff
path: root/searx/engines/duckduckgo.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-03-29 16:38:45 +0100
committerAdam Tauber <asciimoo@gmail.com>2014-03-29 16:38:45 +0100
commit52a817f5c1e8727d9244abb156368d3cbcc0f264 (patch)
treeeebb8a75f1636d39ab196ef53ba478f7ccb74c2f /searx/engines/duckduckgo.py
parentfd730ebcad436ded8720d5ee25b575e39eeb05f4 (diff)
downloadsearxng-52a817f5c1e8727d9244abb156368d3cbcc0f264.tar.gz
searxng-52a817f5c1e8727d9244abb156368d3cbcc0f264.zip
[fix] pep8
Diffstat (limited to 'searx/engines/duckduckgo.py')
-rw-r--r--searx/engines/duckduckgo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py
index ec2858e69..58cbc9872 100644
--- a/searx/engines/duckduckgo.py
+++ b/searx/engines/duckduckgo.py
@@ -5,6 +5,7 @@ from searx.utils import html_to_text
url = 'https://duckduckgo.com/html?{query}&s={offset}'
locale = 'us-en'
+
def request(query, params):
offset = (params['pageno'] - 1) * 30
q = urlencode({'q': query,
@@ -14,7 +15,7 @@ def request(query, params):
def response(resp):
- result_xpath = '//div[@class="results_links results_links_deep web-result"]'
+ result_xpath = '//div[@class="results_links results_links_deep web-result"]' # noqa
url_xpath = './/a[@class="large"]/@href'
title_xpath = './/a[@class="large"]//text()'
content_xpath = './/div[@class="snippet"]//text()'