Get RSS feed with YouTube channel videos excluding shorts

Get RSS feed with YouTube channel videos excluding shorts

Uses htmlq (Like jq, but for HTML.) to query the YouTube channel id.

To exclude the shorts from RSS feed replaces "UC" prefix with "UULF" of the channel id.

Replace <YT_HANDLE> with YouTube channel name.

Terminal window
echo "https://www.youtube.com/feeds/videos.xml?playlist_id=$(curl --silent https://www.youtube.com/@<YT_HANDLE> | htmlq 'meta[itemprop="identifier"]' --attribute content | sed 's/UC/UULF/')"