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

URL should be escaped for shell #1

Merged
merged 1 commit into from
May 28, 2015
Merged

Conversation

dopesong
Copy link
Contributor

Example:

$ youtube-dl --continue --format bestvideo --print-json --ignore-config https://www.youtube.com/watch?feature=player_embedded&v=HTLzK8eyZBA

ERROR: Did you forget to quote the URL? Remember that & is a meta character in most shells, so you want to put the URL in quotes, like youtube-dl "http://www.youtube.com/watch?feature=foo&v=BaW_jenozKc" or simply youtube-dl BaW_jenozKc .

@dopesong
Copy link
Contributor Author

Also errors should be improved, because I found this with this error:

Catchable fatal error: Argument 1 passed to YoutubeDl\Mapper\Mapper::map() must be of the type array, null given, called in /home/test/converter/vendor/norkunas/youtube-dl-php/src/YoutubeDl.php on line 198 and defined in /home/test/converter/vendor/norkunas/youtube-dl-php/src/Mapper/Mapper.php on line 43

No exception for such youtube-dl response.

norkunas added a commit that referenced this pull request May 28, 2015
URL should be escaped for shell
@norkunas norkunas merged commit 6ab1e2c into norkunas:master May 28, 2015
@norkunas
Copy link
Owner

Thanks @dopesong.

@norkunas
Copy link
Owner

@dopesong i tried to execute your provided url without escaping and I got Symfony\Component\Process\Exception\ProcessFailedException as expected.

@dopesong
Copy link
Contributor Author

That's strange. I got this by running proccess in symfony console on CentOS release 6.6 (Final). Also youtube-dl version 2015.05.20.

I think after crash there was no exit code or it was wrong.

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

Successfully merging this pull request may close these issues.

None yet

2 participants