fix discogarchive lol

This commit is contained in:
yosh 2024-04-15 13:03:42 -04:00
parent 979ce211c8
commit 72da2badfe
1 changed files with 2 additions and 1 deletions

View File

@ -182,7 +182,7 @@ for BANDCAMP_DOMAIN in $BANDCAMP_DOMAINS; do
# get album data
curl -L -s -o "$RELEASE_PAGE" "$url"
pup 'head > script[type="application/ld+json"]' 'text{}' < "$RELEASE_PAGE" > "$JSON_HEAD" || continue
pup -p '[data-tralbum] attr{data-tralbum}' 'text{}' < "$RELEASE_PAGE" > "$JSON_TRALBUM" || continue
pup -p '[data-tralbum] attr{data-tralbum}' < "$RELEASE_PAGE" > "$JSON_TRALBUM" || continue
artist="$(jq -r '.byArtist.name' < "$JSON_HEAD")"
name="$(jq -r '.name' < "$JSON_HEAD")"
@ -196,6 +196,7 @@ for BANDCAMP_DOMAIN in $BANDCAMP_DOMAINS; do
# check if it even has audio first
if [ "$(jq .hasAudio < "$JSON_TRALBUM")" != "true" ]; then
errecho "NO AUDIO, LOOK CLOSER: $url"
continue
fi
# now check price :D