Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download video by ID if starts with hyphen #2970

Closed
dhjw opened this issue May 23, 2014 · 2 comments
Closed

Can't download video by ID if starts with hyphen #2970

dhjw opened this issue May 23, 2014 · 2 comments

Comments

@dhjw
Copy link

@dhjw dhjw commented May 23, 2014

Can't seem to download a video by ID if it starts with a hyphen, e.g.

youtube-dl -1WR2z4MK8Q
youtube-dl -e -1WR2z4MK8Q
youtube-dl -o "filename" -i --write-description "-1WR2z4MK8Q"

I've tried both types of quotes, escaping the hyphen, etc., to no avail.

On Ubuntu linux.

@dhjw
Copy link
Author

@dhjw dhjw commented May 23, 2014

Ah, I can use the full URL.

@dhjw dhjw closed this May 23, 2014
@phihag
Copy link
Contributor

@phihag phihag commented May 23, 2014

Like virtually all command-line programs, dashes are for options (unquoted or not, that only makes to shell parsing, youtube-dl gets the same inputs either way). Use the convention of -- to mark an end of options, like

youtube-dl -- -1WR2z4MK8Q

or (as you have discovered yourself) prepend the URL with youtu.be/. Thank you for reporting this, I hope this issue report provides a good guidance for anyone else struggling with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.