Files
youtube-chat-rs/get_url.sh

6 lines
170 B
Bash
Executable File

#!/usr/bin/env bash
CHANNEL=$1
LIVE_ID=$(curl -sL "https://www.youtube.com/@$CHANNEL/live" | grep -oE '"videoId":"([^"]+)"' | head -n 1 | cut -d'"' -f4)
echo "$LIVE_ID"