dotfiles/.scripts/wip/yt-rss-grab.sh

13 lines
279 B
Bash
Executable File

#! /usr/bin/env zsh
[[ ! "$1" ]] && echo './yt-rss-grab.sh [url]' && exit
ID=$(wget $1 -O - -q | grep -o -P '(channelId" content=.{0,25})' | cut -c 21-100)
#----------------------#
echo "https://www.youtube.com/feeds/videos.xml?channel_id=$ID"
exit
#----------------------#