twitch-online

Savoir si une chaîne twitch est en ligne - retour accueil

git clone git://bebou.netlib.re/twitch-online
Log | Files | Refs | README |

commit c1fb7516ea30544bdc01456626d2b0c5ccc31760
parent aac4d45174b0b71b593bb882456bf7906fd93df9
Auterice: arthur <arthur.pons@unistra.fr>
Date:   Tue,  4 Apr 2023 14:24:47 +0200

Séparation de check_live et twitch_update

Diffstat:
Acheck_live | 8++++++++
Mtwitch_update | 15+++------------
2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/check_live b/check_live @@ -0,0 +1,8 @@ +#!/bin/sh + +echo -n "Checking $1 - " +curl -sL https://www.twitch.tv/$1 > $1 +grep -q 'isLiveBroadcast":true' $1 && +echo -n $(grep -ow 'description":".\+embedUrl' $1 | cut -d\" -f3) +echo +rm $1 diff --git a/twitch_update b/twitch_update @@ -1,14 +1,5 @@ #!/bin/sh -check_live() { - echo -n "Checking $1 - " - curl -sL https://www.twitch.tv/$1 > $1 - grep -q 'isLiveBroadcast":true' $1 && - echo -n $(grep -ow 'description":".\+embedUrl' $1 | cut -d\" -f3) - echo - rm $1 -} - -check_live esl_sc2 -check_live pousour -check_live esl_csgo +./check_live esl_sc2 +./check_live pousour +./check_live esl_csgo