1
0

youtube subscribe [channel]

This commit is contained in:
dtb 2022-11-03 01:36:47 -04:00
parent 7dcf8093ad
commit 79cda0bf83

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
id(){
youtube-dl --skip-download --print-json --playlist-items 1 "$1" \
| jq '.channel_id' \
@ -11,6 +13,13 @@ feedurl(){
}
case "$1" in
channel) feedurl "$(id "$2")" ;;
id) feedurl "$2" ;;
esac | xargs curl -o - --
subscribe)
url="$(feedurl "$(id "$2")")"
pig_stow "$url"
;;
refresh)
pig_feed
;;
esac
exit 0