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.
Issue with quotation marks in Output Template #20702
Comments
|
Nothing to do with youtube-dl. Most likely .NET Core process API does not support single quotes. |
|
In case anyone else has the same problem calling youtube-dl from a C# program, my only known workaround is to remove the quotes from around the arguments and just ensure that the arguments have no spaces. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.04.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
Description of your issue, suggested solution and other information
When I run youtube-dl with single quotes around the Output Template, it actually creates a folder with a quote in the folder name.
For this example, I ran this command:
youtube-dl --verbose --format best --no-progress --output 'wwwroot/downloads/%(title)s_%(resolution)s.%(ext)s' https://www.youtube.com/watch?v=C0DPdy98e4cand it created path and file like this (notice the two single quotes):
/var/www/mywebsite/'wwwroot/downloads/TEST VIDEO_480x360.mp4'
but I wanted it to create a file like this:
/var/www/mywebsite/wwwroot/downloads/TEST VIDEO_480x360.mp4
I am running this on ubuntu from a website created with C# and .Net Core. The website runs youtube-dl using the .net feature "Process.Start()". If I copy/paste the same command directly into my terminal, it works fine and creates the file without any extra quotes. Even though it seems somehow related to .Net Core, I think youtube-dl should be smarter at parsing single and double quotes around the Output Template. If you have any tips for fixing this another way, I'd be happy to try it.
Here's my .Net Core code: