1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

Merge pull request #615 from return42/pylint-reddit

[pylint] Reddit engine
This commit is contained in:
Alexandre Flament 2021-12-19 11:32:32 +01:00 committed by GitHub
commit b5d4cac7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Reddit
# lint: pylint
"""Reddit
"""
import json
@ -26,16 +26,16 @@ base_url = 'https://www.reddit.com/'
search_url = base_url + 'search.json?{query}'
# do search-request
def request(query, params):
query = urlencode({'q': query, 'limit': page_size})
params['url'] = search_url.format(query=query)
return params
# get response from search-request
def response(resp):
img_results = []
text_results = []