Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
option to sanitize the user name (%(uploader)s) ... #483
Comments
single quotation marks (') to prevent shell from expanding your input.
may wish to have it somehow-specially sorted. В Sun, 21 Oct 2012 06:41:04 -0700
|
I guess that this reply relates neither to mplayer nor vlc. Of |
|
|
That was an example to say that some characters have special meanings for Bash, and thus the problem is related neither to VLC, mplayer nor youtube-dl. Exclamation points also have a special meaning, and like @Plaque-fcc said they need to either be escaped or quoted with single-quotes; double-quotes will still make bash try to interpret them. So you should instead do |
|
The amperstand thing was an example, what @Plaque-fcc wanted to say is that what you encounter is a bash shell feature (like
or
|
|
~ |
|
Oh, I think you are quite right regarding the original issue, actually. The point was to explain that the issue doesn't come from youtube-dl or the players, but it wasn't meant to undermine your point, I think it's still perfectly valid. The issue is, the name of the uploader should be sanitized to prevent that sort of thing from happening. After all, the "stitle" template is already sanitized, so as far as I can tell it would only be a matter of applying the function |
|
Adding an option for sanitization of the whole filename in a I support this, as it can provide meaningful functional. |
|
When an application that calls cannot handle arbitrary strings (except, maybe, NUL characters), the application is buggy and should be fixed. But I agree that we should provide filesystem-safe strings in the output template (and probably default to them). If we can identify broken (= Cannot support Unicode minus Filesystem-safe strings will not solve your original problem, which is improper encoding into shells. We can offer a flag to remove all characters not in a minimal set of characters - say If you're calling vlc/mplayer in an automated script, encode properly (in shells, that usually entails some kind of escaping, for example putting the variable in quotes in a shell script). If you're calling vlc/mplayer interactively, you need to know your shell's escaping rules. Most shells can help you significantly if you press
Alternatively, you can use wildcards, like
|
I had pointed out an issue already about using --output TEMPLATE options
~
#414
~
Here is another one: there should be an option to sanitize the user name (%(uploader)s) as well. I think the best way to do this is by escaping all characters that are not kosher to filesystems (even those in capital letters (VFAT (pen drives are preformatted as vfat)))
~
Check out for example:
~
youtube.com/watch?v=q8K7GmEW7Lw
~
that user name includes exclamation marks "!" which makes both vlc and mplayer stumble on it even if you use quotes
~
vlc "!!!Thiago Clarinete Flauta Sax/q8K7GmEW7Lw.flv"
bash: !Thiago: event not found
~
mplayer "!!!Thiago Clarinete Flauta Sax/q8K7GmEW7Lw.flv"
bash: !Thiago: event not found
~
thanks
lbrtchx