mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 02:40:11 +01:00
add safesearch support
This commit is contained in:
parent
bcae7ae4e3
commit
78bff4618c
@ -21,12 +21,18 @@ about = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
categories = ['files', 'apps']
|
categories = ['files', 'apps']
|
||||||
|
safesearch = True
|
||||||
|
|
||||||
search_url = 'https://itunes.apple.com/search?{query}'
|
search_url = 'https://itunes.apple.com/search?{query}'
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
params['url'] = search_url.format(query=urlencode({'term': query, 'media': 'software'}))
|
explicit = "Yes"
|
||||||
|
|
||||||
|
if params['safesearch'] > 0:
|
||||||
|
explicit = "No"
|
||||||
|
|
||||||
|
params['url'] = search_url.format(query=urlencode({'term': query, 'media': 'software', 'explicit': explicit}))
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user