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

Batch file doesn't allow URL with quotes #10992

Closed
githubuser135 opened this issue Oct 21, 2016 · 5 comments
Closed

Batch file doesn't allow URL with quotes #10992

githubuser135 opened this issue Oct 21, 2016 · 5 comments

Comments

@githubuser135
Copy link

@githubuser135 githubuser135 commented Oct 21, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.10.21.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.10.21.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

youtube-dl --batch-file doesn't allow URL with quotes

Example:

test.txt

"https://www.youtube.com/watch?t=4&v=BaW_jenozKc"
youtube-dl --batch-file .\test.txt
WARNING: The url doesn't specify the protocol, trying with http
[generic] watch?t=4&v=BaW_jenozKc": Requesting header
WARNING: Could not send HEAD request to http://"https://www.youtube.com/watch?t=4&v=BaW_jenozKc": <urlopen error [Errno 11001] getaddrinfo failed>
[generic] watch?t=4&v=BaW_jenozKc": Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 11001] getaddrinfo failed> (caused by URLError(gaierror(11001, 'getaddrinfo failed'),))

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 21, 2016

Quotes in batch files are interpreted as part of URLs. Just remove them.

@yan12125 yan12125 closed this Oct 21, 2016
@githubuser135
Copy link
Author

@githubuser135 githubuser135 commented Oct 21, 2016

I am using a .bat file to write URLs to a text file, and as far as I know, there is no way to escape special characters from ECHO without using quotes.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 21, 2016

Is ECHO https://www.youtube.com/watch?t=4&v=BaW_jenozKc broken?

@githubuser135
Copy link
Author

@githubuser135 githubuser135 commented Oct 21, 2016

It's URLs with playlist that don't work. I am so sorry, I completely forgot that it worked the way you did it.
So my problem is with ampersand, to escape them you need quotes.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 21, 2016

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.