I did something similar with a youtube downloader I wrote, using a long chain of seds. It is not as beautiful as Python but it is smaller and faster.
When I shared it with HN the youtube-dl author called it "unmaintainable". By who? I have had no problems maintaining it. :)
It still works.
If it anything like his other programs I would expect it will continue to work for as long as we live.
Seems like quite a lot would need to be done, even if it works to some degree. Have you tried it? (I haven't.)
I have had a great user experience with all his other software except one. Thus I was not scared. High learning curve, but high reward.
1. A FORTH he wrote for IOCCC. Problems compiling probably due to my own stupidity.