mirror of
https://github.com/redlib-org/redlib-instances.git
synced 2024-11-13 18:06:15 -05:00
Scrape version number from any HTML tag with id version
This commit is contained in:
parent
9aad0adb49
commit
8f4dfbe252
@ -477,7 +477,7 @@ create_instance_entry ()
|
|||||||
#
|
#
|
||||||
# Future versions of Libreddit may advertise the version in a <meta> tag in
|
# Future versions of Libreddit may advertise the version in a <meta> tag in
|
||||||
# <head>, but it doesn't right now.
|
# <head>, but it doesn't right now.
|
||||||
version="$(<<<"${res}" sed -nE 's/.*<span\s+id="version">(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}" ]]
|
if [[ -z "${version}" ]]
|
||||||
then
|
then
|
||||||
return 4
|
return 4
|
||||||
|
Loading…
Reference in New Issue
Block a user