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

Video IDs starting with - may be parsed as an option

Open TheDude53 opened this issue 3 years ago • 0 comments

When using the global ytdl command from a terminal, simply using the raw video ID as an argument may cause the ID to be parsed as an option, rather than the actual video ID. This causes ytdl to output an error similar to error: unknown option '-X1X7HuFHSg'. While an easy workaround would be to use a prefix such as http://youtu.be/, I figured I should still open an issue as this is likely not intended behavior.

Examples

What happened

command-demo@somelinuxdistro:~# ytdl -i -X1X7HuFHSg
error: unknown option '-X1X7HuFHSg'

What should happen

command-demo@somelinuxdistro:~# ytdl -i -X1X7HuFHSg
title: The Extreme Diet Coke & Mentos Experiments II - The Domino Effect
author: EepyBird
...

TheDude53 avatar Oct 10 '22 03:10 TheDude53