mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[feat] pixiv engine: add filter for AI generated images
This commit is contained in:
@@ -17,6 +17,7 @@ about = {
|
|||||||
# Engine configuration
|
# Engine configuration
|
||||||
paging = True
|
paging = True
|
||||||
categories = ['images']
|
categories = ['images']
|
||||||
|
remove_ai_images = False
|
||||||
|
|
||||||
# Search URL
|
# Search URL
|
||||||
base_url = "https://www.pixiv.net/ajax/search/illustrations"
|
base_url = "https://www.pixiv.net/ajax/search/illustrations"
|
||||||
@@ -34,6 +35,9 @@ def request(query, params):
|
|||||||
"lang": "en",
|
"lang": "en",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if remove_ai_images is True:
|
||||||
|
query_params.update({"ai_type": 1})
|
||||||
|
|
||||||
params["url"] = f"{base_url}/{query}?{urlencode(query_params)}"
|
params["url"] = f"{base_url}/{query}?{urlencode(query_params)}"
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|||||||
@@ -1622,6 +1622,7 @@ engines:
|
|||||||
engine: pixiv
|
engine: pixiv
|
||||||
disabled: true
|
disabled: true
|
||||||
inactive: true
|
inactive: true
|
||||||
|
remove_ai_images: false
|
||||||
pixiv_image_proxies:
|
pixiv_image_proxies:
|
||||||
- https://pximg.example.org
|
- https://pximg.example.org
|
||||||
# A proxy is required to load the images. Hosting an image proxy server
|
# A proxy is required to load the images. Hosting an image proxy server
|
||||||
|
|||||||
Reference in New Issue
Block a user