From 8f4dfbe2523f117cc0390ebbbb1c0e60727032e0 Mon Sep 17 00:00:00 2001 From: Daniel Valentine Date: Wed, 8 Mar 2023 22:02:38 -0700 Subject: [PATCH] Scrape version number from any HTML tag with id `version` --- generate-instances-json.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-instances-json.sh b/generate-instances-json.sh index 74ce6c5..0a1e95e 100755 --- a/generate-instances-json.sh +++ b/generate-instances-json.sh @@ -477,7 +477,7 @@ create_instance_entry () # # Future versions of Libreddit may advertise the version in a tag in # , but it doesn't right now. - version="$(<<<"${res}" sed -nE 's/.*(v([0-9]+\.){2}[0-9]+).*$/\1/p')" + version="$(<<<"${res}" sed -nE 's/.*\s+id="version">(v([0-9]+\.){2}[0-9]+).*$/\1/p')" if [[ -z "${version}" ]] then return 4