mirror of
https://github.com/searxng/searxng.git
synced 2026-05-31 15:07:17 +02:00
[feat] pixiv engine: add filter for AI generated images
This commit is contained in:
@@ -17,6 +17,7 @@ about = {
|
||||
# Engine configuration
|
||||
paging = True
|
||||
categories = ['images']
|
||||
remove_ai_images = False
|
||||
|
||||
# Search URL
|
||||
base_url = "https://www.pixiv.net/ajax/search/illustrations"
|
||||
@@ -34,6 +35,9 @@ def request(query, params):
|
||||
"lang": "en",
|
||||
}
|
||||
|
||||
if remove_ai_images is True:
|
||||
query_params.update({"ai_type": 1})
|
||||
|
||||
params["url"] = f"{base_url}/{query}?{urlencode(query_params)}"
|
||||
|
||||
return params
|
||||
|
||||
Reference in New Issue
Block a user