Will youtube-dl --get-url + curl + tee work for your case?