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

youtube-dl worked one time then reported these/this error #3650

Closed
ghost opened this issue Sep 1, 2014 · 3 comments
Closed

youtube-dl worked one time then reported these/this error #3650

ghost opened this issue Sep 1, 2014 · 3 comments

Comments

@ghost
Copy link

@ghost ghost commented Sep 1, 2014

youtube-dl --verbose https://www.youtube.com/results?search_query=klezmer&page=2
[1] 7617
mark@Lexington:~$ [debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/results?search_query=klezmer']
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.02.17
[debug] Python version 2.7.6 - Linux-3.13.0-35-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] Proxy map: {'no': 'localhost,127.0.0.0/8,::1'}
[download] Downloading playlist: results
[youtube:user] results: Downloading video ids from 1 to 51
ERROR: Unable to download webpage: HTTP Error 403: Forbidden; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 191, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1157, in urlopen
return self._opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

and here there the terminal output stops and I have to CTRL-C to break out. Sorry for not knowing what to do here, this is my 1st time reporting a bug.

@naglis
Copy link
Collaborator

@naglis naglis commented Sep 1, 2014

Hi,
the ampersand (&) in your URL is interpreted by Bash, and the URL that Youtube DL receives gets cut off (you can see that in the line [debug] Command-line args: ['--verbose', 'https://www.youtube.com/results?search_query=klezmer']). To avoid that, you can escape the ampersand with a backslash (\):

youtube-dl https://www.youtube.com/results?search_query=klezmer\&page=2

or enclose the whole URL in quotes:

youtube-dl 'https://www.youtube.com/results?search_query=klezmer&page=2'
@naglis
Copy link
Collaborator

@naglis naglis commented Sep 1, 2014

Oh, also, you are using an outdated version of youtube-dl, and you'll need to update to a more recent version (at least 2014.07.25) for it to work. Type youtube-dl -U to update.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 1, 2014

@naglis is right, using the last version of youtube-dl should work and you must escape the & .
I'm closing the issue, but if it doesn't work, please comment here and we'll reopen it.

@jaimeMF jaimeMF closed this Sep 1, 2014
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.