summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBen Busby <contact@benbusby.com>2022-03-18 13:28:45 -0600
committerBen Busby <contact@benbusby.com>2022-03-18 13:28:45 -0600
commit20347822da52fdcff50924914d3a0928cffd27f3 (patch)
treebfc9c5f1d89a79bcf2fb2b24ae584415d5858e0b /.github
parent7647c1c10137356c4a5c64962f40ccbdd9d5596d (diff)
downloadfarside-20347822da52fdcff50924914d3a0928cffd27f3.tar.gz
Support SearXNG
Added a new seperate service for only redirecting to SearXNG instances. Note that plain "searx" redirects will use both SearX and SearXNG instances for those who don't have a preference between the two. Closes #23
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-instances.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml
index 2a02eae..e7eb2cf 100644
--- a/.github/workflows/update-instances.yml
+++ b/.github/workflows/update-instances.yml
@@ -62,6 +62,33 @@ jobs:
apply_update
# ==============================================================
+ # SearxNG update
+ # ==============================================================
+ curl -s https://searx.space/data/instances.json | \
+ jq '[
+ .instances |
+ to_entries[] |
+ select(.value.network_type == "normal") |
+ select(.value.version | . != null) |
+ select(.value.network.asn_privacy == 0) |
+ select(.value.http.error == null) |
+ select(.value.tls.grade == "A+" or .value.tls.grade == "A") |
+ select(.value.http.grade == "A+" or .value.http.grade == "A") |
+ select(.value.html.grade == "V" or .value.html.grade == "F") |
+ select(.value.docs_url | . != null) |
+ select(.value.docs_url | contains("searxng")) |
+ .key
+ ] | sort' > searxng-tmp.json
+
+ cat searxng-tmp.json | jq .
+
+ jq --slurpfile searxng searxng-tmp.json \
+ '( .[] | select(.type == "searxng") )
+ .instances |= $searxng[0]' services.json > services-tmp.json
+
+ apply_update
+
+ # ==============================================================
# SimplyTranslate update
# ==============================================================
curl -s https://simple-web.org/instances/simplytranslate > st-out