That’s really smart! Could you share your script (as a Gist or something) I’d really like to use it.
You need to install YouTube-DL via Pip, but happily the StaSh shell for Pythonista already includes Pip. If you're not using StaSh yet, give it a whirl - it includes a huge number of handy tools like SSH, Git, Pip, etc. Pythonista is awesome!