Files
StreamingCommunity/script_link.sh
2025-01-13 18:32:09 +01:00

12 lines
355 B
Bash
Executable File

#!/bin/bash
PWD_SC="$PWD"
attuale=$(<$PWD_SC/attuale.txt)
nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?')
if [ "$attuale" != "$nuovo" ]; then
attuale="$nuovo"
echo "$attuale" > $PWD_SC/attuale.txt
fi
echo -e "\n $attuale\n"