youtube subscribe [channel]
This commit is contained in:
parent
7dcf8093ad
commit
79cda0bf83
15
rss/youtube
15
rss/youtube
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user