Skip to content

Hot Ones YouTube TVDB Matching #295

Answered by baxterblk
baxterblk asked this question in Q&A
Discussion options

You must be logged in to vote

Here what I'm seeing... which states it grabs for a URL first then it looks for production code.

# Fetch the TVDB page for the episode
95: tvdbPageData=$(curl -s "https://thetvdb.com/series/$seriesTvdbTitleSlug/episodes/$episodeId")

# Attempt to extract a YouTube URL directly from the TVDB page
96: downloadUrl=$(echo "$tvdbPageData" | grep -i youtube.com  | grep -i watch | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*")

# If no YouTube URL is found, check for the YouTube network and use the production code
98: if [ -z $downloadUrl ]; then
99:     network="$(echo "$tvdbPageData" | grep -i "/companies/youtube")"

I've updated ALL episodes on TVDB with the corresponding URL to the main web…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@RandomNinjaAtk
Comment options

@baxterblk
Comment options

Answer selected by RandomNinjaAtk
@baxterblk
Comment options

@RandomNinjaAtk
Comment options

@baxterblk
Comment options

@RandomNinjaAtk
Comment options

Comment options

You must be logged in to vote
2 replies
@baxterblk
Comment options

@baxterblk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants