I've written scripting for the Android kodi app to do the tuning. (I love how all these DIY TV technologies go around and around and touch each other.
)
kodi has a huge number of add-ons for various types of live streaming. We can use kodi for all the hard work of finding and decoding the streams (including DRM sometimes) and just run its player output through an HDMI encoder to capture it. Even if there is a dedicated app for particular content, kodi might be a better choice for scripting because it has a fairly rich API and doesn't depend on quirky adb remote control emulation with finicky delays.
You can find the chromecast/kodi_faves scripts in this branch of my fork of the repo. (If you try to go there a few days from now and find the links don't work, it's probably because I did a PR to the main repo and deleted my branch after it was merged. I'm just giving it some bake time before I do that.)
If you are not too git-savvy, here are direct links to:






