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

HTTP Error 402: Payment Required; #1307

Closed
szunyi opened this issue Aug 24, 2013 · 7 comments
Closed

HTTP Error 402: Payment Required; #1307

szunyi opened this issue Aug 24, 2013 · 7 comments

Comments

@szunyi
Copy link

@szunyi szunyi commented Aug 24, 2013

here is my -verbose log:

youtube-dl -cit --verbose https://www.youtube.com/watch?v=pJL7hiOhBCk

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-cit', '--verbose', 'https://www.youtube.com/watch?v=pJL7hiOhBCk']
[debug] youtube-dl version 2013.08.23
[debug] Python version 2.6.6 - Linux-3.2.45-x86_64-with-glibc2.2.5
[debug] Proxy map: {}
[youtube] Setting language
[youtube] pJL7hiOhBCk: Downloading video webpage
[youtube] pJL7hiOhBCk: Downloading video info webpage
ERROR: unable to download video info webpage: HTTP Error 402: Payment Required; 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 "./youtube-dl/youtube_dl/extractor/common.py", line 128, in _request_webpage
return compat_urllib_request.urlopen(url_or_request)
File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib64/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.6/urllib2.py", line 435, in error
return self._call_chain(_args)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(_args)
File "/usr/lib64/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

thanks for investigate

@ngawang
Copy link

@ngawang ngawang commented Aug 24, 2013

I got a similar error when I tried to download with WebM 480p format but when I tried with mp4 at 480p the download began.

Here is the first attempt with WebM:

youtube-dl -f 43 https://www.youtube.com/watch?v=UV_X2B5OK1I
[youtube] Setting language
[youtube] UV_X2B5OK1I: Downloading video webpage
[youtube] UV_X2B5OK1I: Downloading video info webpage
ERROR: unable to download video info webpage: HTTP Error 402: Payment Required; 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.

Then as mp4:

youtube-dl -f 18 https://www.youtube.com/watch?v=UV_X2B5OK1I
[youtube] Setting language
[youtube] UV_X2B5OK1I: Downloading video webpage
[youtube] UV_X2B5OK1I: Downloading video info webpage
[youtube] UV_X2B5OK1I: Extracting video information
WARNING: unable to extract uploader nickname
[download] Destination: The Elegant Universe 1 of 3 Einstein's Dream-UV_X2B5OK1I.mp4
[download] 0.0% of 212.22MiB at 34.49KiB/s ETA 01:44:57

@pyed
Copy link

@pyed pyed commented Aug 26, 2013

I get something similar when i try to update youtube-dl

Mac:~$ youtube-dl --verbose update
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'update']
[debug] youtube-dl version 2013.08.09
[debug] Python version 2.7.2 - Darwin-12.4.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] update: Downloading video webpage
ERROR: Unable to download video webpage: HTTP Error 404: Not Found; 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.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 550, in _real_extract
    video_webpage_bytes = compat_urllib_request.urlopen(request).read()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 513, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 438, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 521, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 96, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 552, in _real_extract
    raise ExtractorError(u'Unable to download video webpage: %s' % compat_str(err))
ExtractorError: Unable to download video webpage: HTTP Error 404: Not Found; 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.

but downloading works great, i even used your command youtube-dl -cit --verbose https://www.youtube.com/watch?v=pJL7hiOhBCk

@phihag
Copy link
Contributor

@phihag phihag commented Aug 26, 2013

@pyed Your issue is unrelated - you forgot the dashes before update (and then youtube-dl tries to download the URL update and fails). Try

sudo youtube-dl --update
@pyed
Copy link

@pyed pyed commented Aug 27, 2013

@phihag I must be high on something when i wrote that, for real, sorry.

@phihag
Copy link
Contributor

@phihag phihag commented Aug 28, 2013

As documented in our FAQ 402 errors are youtube's way of saying that you've downloaded too much. @szunyi How much data did you (approximately) download from youtube? In my personal experience and from what I've heard before, the limit should not hit even excessive normal users, I've successfully downloaded 20+ GB on a single day from a single IP address.

In any case, either solving the captcha or switching the IP address should work.

@szunyi
Copy link
Author

@szunyi szunyi commented Aug 28, 2013

hehe :)
It was such a thought is that why I can not download more videos
around ~700 HD video from 3-4 minutes to 15-20minutes long :)

my account on hostgator (unlimited hosting) was very fast - 15.13MiB/s to 55 :)

@ocisly
Copy link
Contributor

@ocisly ocisly commented May 26, 2014

@phihag these have both been resolved

@dstftw dstftw closed this Jan 24, 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
6 participants
You can’t perform that action at this time.