There's nothing fancy in youtube-dl. It's just a bunch of ad-hoc scripts maintained by folks which make it convenient to route the api responses to files on disks. Literally things like pulling html and regexing for certain snippets. In fact it supports many video services, cspan for one. It just dispatches to the appropriate scraper based on the endpoint.