diff options
author | ta <alt3753.7@gmail.com> | 2022-08-24 18:31:04 +0700 |
---|---|---|
committer | ta <alt3753.7@gmail.com> | 2022-08-24 18:31:04 +0700 |
commit | 78bff4618cd4db242d4b7e27ef42b465a0df5484 (patch) | |
tree | 95b5485d52c4bad835c6203533c35ed747901c38 | |
parent | bcae7ae4e3861959102a5a2c903b829dc5a22d6a (diff) | |
download | searxng-78bff4618cd4db242d4b7e27ef42b465a0df5484.tar.gz searxng-78bff4618cd4db242d4b7e27ef42b465a0df5484.zip |
add safesearch support
-rw-r--r-- | searx/engines/apple_app_store.py | 8 |
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 |