Des commandes pour utiliser youtube - retour accueil
git clone git://bebou.netlib.re/ytcli
Log | Files | Refs | README |
twitchgetstreams (415B)
1 #! /bin/sh 2 3 chromium --headless=new --timeout=2000 --dump-dom "https://www.twitch.tv$1" | 4 sed 's/">/\n/g' | 5 grep -E '(data-test-selector="TitleAndChannel"|viewers)' | 6 while read line;do 7 echo "$line" | grep -Eq "viewers" \ 8 && { echo "$line" | cut -d'<' -f1; } \ 9 || { echo "$line" | cut -d'"' -f8,12 | tr '"' ' ' | cut -d' ' -f3-; } 10 done | 11 paste - - | 12 awk -F'\t' -vOFS='\t' '{print $2,$1,$3}' 13