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

1/16/2015 version reveals a 404 on a pretty average youtube. #4762

Closed
TheJohnTalent opened this issue Jan 22, 2015 · 2 comments
Closed

1/16/2015 version reveals a 404 on a pretty average youtube. #4762

TheJohnTalent opened this issue Jan 22, 2015 · 2 comments

Comments

@TheJohnTalent
Copy link

@TheJohnTalent TheJohnTalent commented Jan 22, 2015

../music/youtube-dl --verbose https://www.youtube.com/watch?x-yt-cl=84359240&v=8nlV0RjW4rI&x-yt-ts=1421782837
[1] 13746
[2] 13747
bash: x-yt-ts=1421782837: command not found
[2]+ Done v=8nlV0RjW4rI
john@talent:~/Downloads/2015/ai$ [debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?x-yt-cl=84359240']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.16
[debug] Python version 2.7.3 - Linux-3.17-1-amd64-x86_64-with-debian-7.8
[debug] exe versions: none
[debug] Proxy map: {}
[generic] watch?x-yt-cl=84359240: Requesting header
[redirect] Following redirect to https://www.youtube.com/supported_browsers?next_url=%2F
[download] Downloading playlist: supported_browsers
[youtube:user] supported_browsers: Downloading video ids from 1 to 51
ERROR: Unable to download webpage: HTTP Error 400: Bad Request (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "../music/youtube-dl/youtube_dl/extractor/common.py", line 293, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "../music/youtube-dl/youtube_dl/YoutubeDL.py", line 1412, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@naglis
Copy link
Collaborator

@naglis naglis commented Jan 22, 2015

Your URL contains unescaped ampersands which have a special meaning (run the command in background) in bash (your shell), so the URL gets cut off (notice how youtube-dl only gets https://www.youtube.com/watch?x-yt-cl=84359240 in command-line args). Also notice the weird output in the beginning: [1] 13746, [2] 13747, bash: x-yt-ts=1421782837: command not found, [2]+ Done v=8nlV0RjW4rI - this is the output from bash trying to interpret and run the cut off parts of the URL.

To solve this issue, either escape the ampersands with backslashes (\), like this:

youtube-dl https://www.youtube.com/watch?x-yt-cl=84359240\&v=8nlV0RjW4rI\&x-yt-ts=1421782837

on enclose the URL in single or double quotes:

youtube-dl 'https://www.youtube.com/watch?x-yt-cl=84359240&v=8nlV0RjW4rI&x-yt-ts=1421782837'

Once you've done that, it should work fine.

@naglis naglis closed this Jan 22, 2015
@TheJohnTalent
Copy link
Author

@TheJohnTalent TheJohnTalent commented Jan 22, 2015

Perfect thank you Nagils!

 On Wednesday, January 21, 2015 10:00 PM, Naglis Jonaitis <notifications@github.com> wrote:

Closed #4762.—
Reply to this email directly or view it on GitHub.

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.