instanceinfo: Fix soapbox detection
Soapbox answers with a JSON error message.
This commit is contained in:
parent
342091a995
commit
8cba1092bf
|
@ -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' \
|
||||
|
|
Loading…
Reference in New Issue
Block a user