mirror of
https://github.com/libreddit/libreddit-instances.git
synced 2025-10-05 23:02:38 +02:00
Scrape version number from any HTML tag with id version
This commit is contained in:
@@ -477,7 +477,7 @@ create_instance_entry ()
|
||||
#
|
||||
# Future versions of Libreddit may advertise the version in a <meta> tag in
|
||||
# <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}" ]]
|
||||
then
|
||||
return 4
|
||||
|
Reference in New Issue
Block a user