instanceinfo: Fix soapbox detection

Soapbox answers with a JSON error message.
This commit is contained in:
tastytea 2022-05-25 20:32:55 +02:00
parent 342091a995
commit 8cba1092bf
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Print some basic info about fediverse instances.
# Version: 2021-02-22_1
# Version: 2022-05-25_1
if [[ -z "${1}" ]]; then
echo "usage: ${0} DOMAIN" >&2
@ -186,7 +186,7 @@ function main()
local mastoinfo="https://${instance}/api/v1/instance"
local misskeyinfo="https://${instance}/api/meta"
if ${mycurl} -ILf -X POST "${misskeyinfo}" | grep -iq 'Content-Type: application/json'; then
if ${mycurl} -ILf -X POST "${misskeyinfo}" | grep -iq 'HTTP.*200'; then
echo "Misskey API found."
parse_misskey "${instance}" "${misskeyinfo}"
elif ${mycurl} -ILf "${nodeinfo}" | grep -iq 'Content-Type: application/json' \