From 47df8e9ef5c327ebe7d799c7080fe6de30fa6d7b Mon Sep 17 00:00:00 2001 From: James Swineson Date: Tue, 9 Apr 2019 18:09:20 +0800 Subject: [PATCH] update URL parsing --- menhera.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menhera.sh b/menhera.sh index 52c6ccd..083ce79 100755 --- a/menhera.sh +++ b/menhera.sh @@ -29,7 +29,7 @@ get_rootfs() { # forgive me for parsing HTML with these shit # and hope it works - ROOTFS_TIME=$(curl "https://uk.images.linuxcontainers.org/images/debian/stretch/amd64/default/?C=M;O=D" | grep "folder.gif" | head -n 1 | cut -d'>' -f7 | cut -d'/' -f1) + ROOTFS_TIME=$(curl -fsSL "https://images.linuxcontainers.org/images/debian/stretch/amd64/default/?C=M;O=D" | grep -oP '(\d{8}_\d{2}:\d{2})' | head -n 1) ROOTFS="https://images.linuxcontainers.org/images/debian/stretch/amd64/default/${ROOTFS_TIME}/rootfs.squashfs" else