How can I get the URL of a video that I'm downloading using youtube_dl?
I can use progress hooks to get other characteristics of the download, like the file path:
def progress_hook(response):
if response["status"] == "finished":
file_name = response["filename"]
ydl_opts = {
'progress_hooks': [progress_hook]
}
I also want to get the URL that the file came from. I can't figure out how to do that. Something like url = response["url"] would be good, but there aren't very many options with progress hooks.