From 097ba6851ff61adf9f6eca52b59dae46b997fb88 Mon Sep 17 00:00:00 2001 From: yosh Date: Thu, 21 Sep 2023 10:04:51 -0400 Subject: [PATCH] twitch-notify: fix incorrect syntax --- twitch-notify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitch-notify b/twitch-notify index 0de7c92..0bc3ff4 100755 --- a/twitch-notify +++ b/twitch-notify @@ -28,12 +28,12 @@ check() { tmphtml="$2" max_tries=2 trap 'innerclean "$tmphtml"' INT HUP TERM EXIT - curl -s -o "$2" -L "https://twitch.tv/$1" + curl --connect-timeout 10 -s -o "$2" -L "https://twitch.tv/$1" if [ -n "$(pup 'script[type="application/ld+json"]' < "$2")" ]; then if [ ! -f "$DIR/$1" ]; then touch "$DIR/$1" IMG="$(mktemp -t "twitch-notify-img.XXXX")" - curl -s -o "$IMG" -L "$(pup 'meta[property="og:image"]' 'attr{content}' < "$2")" + curl --connect-timeout 10 -s -o "$IMG" -L "$(pup 'meta[property="og:image"]' 'attr{content}' < "$2")" TITLE="$(pup 'script[type="application/ld+json"] text{}' < "$2" | jq -r '.[0].description')" CODE="$(notify-send -A "watch" -A "copy" -t 10000 -u normal -i "$IMG" "$1 is online!$NL$NL\"$TITLE\"")" case "${CODE:-999}" in