1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

[fix] pep8

This commit is contained in:
Adam Tauber 2014-03-29 16:38:45 +01:00
parent fd730ebcad
commit 52a817f5c1

View File

@ -5,6 +5,7 @@ from searx.utils import html_to_text
url = 'https://duckduckgo.com/html?{query}&s={offset}' url = 'https://duckduckgo.com/html?{query}&s={offset}'
locale = 'us-en' locale = 'us-en'
def request(query, params): def request(query, params):
offset = (params['pageno'] - 1) * 30 offset = (params['pageno'] - 1) * 30
q = urlencode({'q': query, q = urlencode({'q': query,
@ -14,7 +15,7 @@ def request(query, params):
def response(resp): 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' url_xpath = './/a[@class="large"]/@href'
title_xpath = './/a[@class="large"]//text()' title_xpath = './/a[@class="large"]//text()'
content_xpath = './/div[@class="snippet"]//text()' content_xpath = './/div[@class="snippet"]//text()'