Des commandes pour utiliser youtube - retour accueil
git clone git://bebou.netlib.re/ytcli
Log | Files | Refs | README |
ytgetchannel (327B)
1 #! /bin/sh 2 3 rank() { 4 sort | uniq -c | sort -nr 5 } 6 7 request() { 8 encoded=$(echo "$@" | sed 's/ /+/g') 9 curl -Ls "https://www.youtube.com/results?search_query=$encoded" 10 } 11 12 request "$@" | 13 grep -Eo 'WEB_PAGE_TYPE_CHANNEL[^@]+@[^"]+"' | 14 sed -E 's/.*browseId":"([^"]*)"[^@]+@([^"]+)./\1 \2/' | 15 rank | 16 awk '{print $3" "$2" "$1}' 17