newsraft feeds change

This commit is contained in:
2026-01-05 18:28:57 +01:00
parent 5398d3fb29
commit 9b89c20c8a

View File

@@ -44,11 +44,24 @@ You can get an RSS feed from any YouTube video with this script:
``` ```
#!/bin/sh #!/bin/sh
CHANNEL_ID="$(curl -s "$1" | tr ',' '\n' | grep -Po 'channelId":"\K[\w+-]+' | tail -1)" set -e
FEED_URL="https://www.youtube.com/feeds/videos.xml?channel_id=$CHANNEL_ID"
CHANNEL_NAME="$(curl -s "$FEED_URL" | grep -m 1 -Po 'title\>\K[\w\s]+')"
printf '%s "%s"\n' "$FEED_URL" "$CHANNEL_NAME" db=~/rec/feeds.rec
rec="${2:-$db}"
[ ! -z "$1" ] || {
echo "Give me a youtube URL"
exit 1
}
[ -w "$rec" ] || touch "$rec"
CHANNEL_ID="$(curl -s "$1" | tr ',' '\n' | grep -Po 'channelId":"\K[\w+-]+' | tail -1)"
URL="https://www.youtube.com/feeds/videos.xml?channel_id=$CHANNEL_ID"
Name="$(curl -s "$URL" | grep -m 1 -Po 'title\>\K[\w\s]+')"
recins --verbose -t Feed -f Name -v "${Name}" -f URL -v "${URL}" -f Category -v Videos -f Rating -v 3 -f Working -v yes "$rec"
``` ```