summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorta <alt3753.7@gmail.com>2022-08-24 18:31:04 +0700
committerta <alt3753.7@gmail.com>2022-08-24 18:31:04 +0700
commit78bff4618cd4db242d4b7e27ef42b465a0df5484 (patch)
tree95b5485d52c4bad835c6203533c35ed747901c38
parentbcae7ae4e3861959102a5a2c903b829dc5a22d6a (diff)
downloadsearxng-78bff4618cd4db242d4b7e27ef42b465a0df5484.tar.gz
searxng-78bff4618cd4db242d4b7e27ef42b465a0df5484.zip
add safesearch support
-rw-r--r--searx/engines/apple_app_store.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/engines/apple_app_store.py b/searx/engines/apple_app_store.py
index fe8f6ec83..112c58224 100644
--- a/searx/engines/apple_app_store.py
+++ b/searx/engines/apple_app_store.py
@@ -21,12 +21,18 @@ about = {
}
categories = ['files', 'apps']
+safesearch = True
search_url = 'https://itunes.apple.com/search?{query}'
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