So I didn't know you can actually get an RSS feed for a given YouTube channel.
At the time of this writing if you open the source code of the channel you'll find:
"externalId":"UCoLrcjPV5PbUrUyXq5mjc_A"
Code language: JavaScript (javascript)
Feed url
Then use that ID with this URL.
https://www.youtube.com/feeds/videos.xml?channel_id=XXXXX
Code language: JavaScript (javascript)
Done!
Feed parser with PHP and WordPress
So I built this small PHP script to fetch the RSS feed. It is tailored for my needs:
- Find the Boston Red Sox game recaps
- Post it in my WordPress as a post
- Send me an email if new videos are found
You can find the source code on Github https://github.com/quicoto/redsox-video-feed/