node-ytdl icon indicating copy to clipboard operation
node-ytdl copied to clipboard

Filename tokens failing

Open JamesRBrown opened this issue 3 years ago • 3 comments

It seems that the tokens for the -o / --output are failing.

In the provided example:

ytdl -o "{author.name} - {title}" "http://www.youtube.com/watch?v=_HSylqgVYQI"

The output filename is saved as:

{author.name} - {title}.mp4

I know the earlier versions of the utility didn't have this issue, but I was looking at the code, and it looks like a fair little bit has changed since I first downloaded ytdl back in April of 2018.

JamesRBrown avatar Jun 29 '21 02:06 JamesRBrown

I have the same issue.

I thought it might be a variable problem, so I tried the following code, but it all failed.

ytdl -o "{title}" "http://www.youtube.com/watch?v=_HSylqgVYQI"
ytdl -o "{title}"http://www.youtube.com/watch?v=_HSylqgVYQI"
ytdl -o {title} http://www.youtube.com/watch?v=_HSylqgVYQI"
ytdl -o title http://www.youtube.com/watch?v=_HSylqgVYQI"
ytdl -o "title" http://www.youtube.com/watch?v=_HSylqgVYQI"

newt0 avatar Jul 18 '21 05:07 newt0

I thought it was a problem with the version of node.js because I was able to do it before. So I switched the version of node.js to 16, 13, and 12 and did npm -g install ytdl in each of them. But it didn't work in all environments.

newt0 avatar Jul 18 '21 05:07 newt0

You can bypass this with {videoDetails.title}. (until the pr is merged)

itzTheMeow avatar Apr 15 '22 22:04 itzTheMeow