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] HTTP Error 403: Forbidden #24360

Closed
marburger93 opened this issue Mar 15, 2020 · 1 comment
Closed

[YouTube] HTTP Error 403: Forbidden #24360

marburger93 opened this issue Mar 15, 2020 · 1 comment

Comments

@marburger93
Copy link

@marburger93 marburger93 commented Mar 15, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.03.08
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

./youtube-dl-org -v -4 "https://www.youtube.com/watch?v=-l75qaSDWe8"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-4', u'https://www.youtube.com/watch?v=-l75qaSDWe8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Python version 2.7.9 (CPython) - Linux-4.9.182-xxxx-std-ipv6-64-x86_64-with-Debian-7
[debug] exe versions: avconv 11.12-6, avprobe 11.12-6, ffmpeg N-48007-g62f8d27ef1-static
[debug] Proxy map: {}
[youtube] -l75qaSDWe8: Downloading webpage
[youtube] -l75qaSDWe8: Downloading embed webpage
[youtube] -l75qaSDWe8: Refetching age-gated info webpage
[youtube] {18} signature length 106, html5 player vflset
[youtube] {137} signature length 102, html5 player vflset
[youtube] {248} signature length 106, html5 player vflset
[youtube] {399} signature length 106, html5 player vflset
[youtube] {136} signature length 106, html5 player vflset
[youtube] {247} signature length 106, html5 player vflset
[youtube] {398} signature length 102, html5 player vflset
[youtube] {135} signature length 106, html5 player vflset
[youtube] {244} signature length 106, html5 player vflset
[youtube] {397} signature length 106, html5 player vflset
[youtube] {134} signature length 106, html5 player vflset
[youtube] {243} signature length 106, html5 player vflset
[youtube] {396} signature length 106, html5 player vflset
[youtube] {133} signature length 106, html5 player vflset
[youtube] {242} signature length 106, html5 player vflset
[youtube] {395} signature length 102, html5 player vflset
[youtube] {160} signature length 102, html5 player vflset
[youtube] {278} signature length 106, html5 player vflset
[youtube] {394} signature length 102, html5 player vflset
[youtube] {140} signature length 106, html5 player vflset
[youtube] {249} signature length 102, html5 player vflset
[youtube] {250} signature length 106, html5 player vflset
[youtube] {251} signature length 106, html5 player vflset
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on u'https://r3---sn-25glen7e.googlevideo.com/videoplayback?expire=1584311241&ei=aVduXqy7J4O9xN8PzIaagAw&ip=XXX.XXX.XXX.XXX&id=o-ABFiG7TfU-tuhmOxyEfqr4hWwSawGwjRwc2nQuR8R4vr&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&mh=pT&mm=31%2C26&mn=sn-25glen7e%2Csn-h5q7rn7s&ms=au%2Conr&mv=m&mvi=2&pl=21&initcwndbps=326250&vprv=1&mime=video%2Fmp4&gir=yes&clen=74865114&dur=286.880&lmt=1579389740893864&mt=1584289542&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRQIgT_mhDxuV_ClsLfq52CKoxnOha7K-sURNqK7W9WCcdbQCIQDft1Lzg-u3PpsJoDCCUuz-gQwD7GE8W5X4Ijx9De7Atw%3D%3D&sig=2KvYPeZCkY5a2-JbNIUbXq_CHWileNwRrqoW76hmGICc9_Z1ATqcROHIUpU1lOxLiv7L4JOJxiBVzmGSpWRS4bgIARwMGkhKDADD&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1920, in process_info
    partial_success = dl(fname, new_info)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "./youtube-dl-org/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
# ./youtube-dl -v -4 --format=bestaudio[ext=webm] "https://www.youtube.com/watch?v=-l75qaSDWe8"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-4', u'--format=bestaudio[ext=webm]', u'https://www.youtube.com/watch?v=-l75qaSDWe8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Python version 2.7.13 (CPython) - Linux-4.15.18-12-pve-x86_64-with-debian-9.11
[debug] exe versions: ffmpeg N-48007-g62f8d27ef1-static
[debug] Proxy map: {}
[youtube] -l75qaSDWe8: Downloading webpage
[youtube] -l75qaSDWe8: Downloading embed webpage
[youtube] -l75qaSDWe8: Refetching age-gated info webpage
[youtube] {18} signature length 106, html5 player vflset
[youtube] {137} signature length 106, html5 player vflset
[youtube] {248} signature length 106, html5 player vflset
[youtube] {399} signature length 102, html5 player vflset
[youtube] {136} signature length 106, html5 player vflset
[youtube] {247} signature length 102, html5 player vflset
[youtube] {398} signature length 102, html5 player vflset
[youtube] {135} signature length 106, html5 player vflset
[youtube] {244} signature length 106, html5 player vflset
[youtube] {397} signature length 106, html5 player vflset
[youtube] {134} signature length 106, html5 player vflset
[youtube] {243} signature length 106, html5 player vflset
[youtube] {396} signature length 106, html5 player vflset
[youtube] {133} signature length 106, html5 player vflset
[youtube] {242} signature length 102, html5 player vflset
[youtube] {395} signature length 106, html5 player vflset
[youtube] {160} signature length 106, html5 player vflset
[youtube] {278} signature length 106, html5 player vflset
[youtube] {394} signature length 102, html5 player vflset
[youtube] {140} signature length 106, html5 player vflset
[youtube] {249} signature length 106, html5 player vflset
[youtube] {250} signature length 102, html5 player vflset
[youtube] {251} signature length 102, html5 player vflset
[debug] Invoking downloader on u'https://r3---sn-4g5ednsd.googlevideo.com/videoplayback?expire=1584310008&ei=mFJuXtyzJ5Lm1gLx9YmIAg&ip=XXX.XXX.XXX.XXX&id=o-AFfmAsyacRmbcTGMRNJiQauV414Vkzn7YfLVUXd1RLKw&itag=251&source=youtube&requiressl=yes&mh=pT&mm=31%2C26&mn=sn-4g5ednsd%2Csn-h0jeener&ms=au%2Conr&mv=m&mvi=2&pl=20&initcwndbps=737500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4731620&dur=286.901&lmt=1540275483991092&mt=1584288338&fvip=3&keepalive=yes&fexp=23842630%2C23882514&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRgIhAM88PWYQemkDzOJ888e_SCXL_D80Y2wqEyCykcbjbYSZAiEA-DwYaI4n3dtW0KM7ookEsmD7YqGptmbgx2lgKoBjeAs%3D&sig=j1Mzyu3yZ9hZGeW7y9XS5dmWe_bkPZob35ZJoG0cFIC0gWQFAD7wFPjGy1gTm3_fI0rgQF1AQt2smqvfD8yGBegIARwMGkhKDADp&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "./youtube-dl-org/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
 # ./youtube-dl -F "https://www.youtube.com/watch?v=-l75qaSDWe8"
[youtube] -l75qaSDWe8: Downloading webpage
[youtube] -l75qaSDWe8: Downloading embed webpage
[youtube] -l75qaSDWe8: Refetching age-gated info webpage
[info] Available formats for -l75qaSDWe8:
format code  extension  resolution note
249          webm       audio only tiny   52k , opus @ 50k (48000Hz), 1.71MiB
250          webm       audio only tiny   69k , opus @ 70k (48000Hz), 2.26MiB
140          m4a        audio only tiny  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 4.43MiB
251          webm       audio only tiny  138k , opus @160k (48000Hz), 4.51MiB
394          mp4        256x144    144p   85k , av01.0.00M.08, 25fps, video only, 2.40MiB
278          webm       256x144    144p   96k , webm container, vp9, 25fps, video only, 3.11MiB
160          mp4        256x144    144p  108k , avc1.4d400c, 25fps, video only, 2.33MiB
395          mp4        426x240    240p  179k , av01.0.00M.08, 25fps, video only, 4.09MiB
242          webm       426x240    240p  221k , vp9, 25fps, video only, 5.80MiB
133          mp4        426x240    240p  306k , avc1.4d4015, 25fps, video only, 4.89MiB
396          mp4        640x360    360p  325k , av01.0.01M.08, 25fps, video only, 6.95MiB
243          webm       640x360    360p  405k , vp9, 25fps, video only, 11.18MiB
134          mp4        640x360    360p  554k , avc1.4d401e, 25fps, video only, 8.54MiB
397          mp4        854x480    480p  597k , av01.0.04M.08, 25fps, video only, 11.54MiB
244          webm       854x480    480p  753k , vp9, 25fps, video only, 17.01MiB
135          mp4        854x480    480p  988k , avc1.4d401e, 25fps, video only, 11.39MiB
398          mp4        1280x720   720p 1157k , av01.0.05M.08, 25fps, video only, 22.76MiB
247          webm       1280x720   720p 1500k , vp9, 25fps, video only, 22.67MiB
136          mp4        1280x720   720p 1933k , avc1.4d401f, 25fps, video only, 20.71MiB
399          mp4        1920x1080  1080p 2005k , av01.0.08M.08, 25fps, video only, 39.02MiB
248          webm       1920x1080  1080p 2607k , vp9, 25fps, video only, 30.76MiB
137          mp4        1920x1080  1080p 4322k , avc1.640028, 25fps, video only, 71.40MiB
18           mp4        640x360    360p  606k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 20.74MiB (best)
# ./youtube-dl -v -4 -f 251 "https://www.youtube.com/watch?v=-l75qaSDWe8"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-4', u'-f', u'251', u'https://www.youtube.com/watch?v=-l75qaSDWe8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Python version 2.7.13 (CPython) - Linux-4.15.18-12-pve-x86_64-with-debian-9.11
[debug] exe versions: ffmpeg N-48007-g62f8d27ef1-static
[debug] Proxy map: {}
[youtube] -l75qaSDWe8: Downloading webpage
[youtube] -l75qaSDWe8: Downloading embed webpage
[youtube] -l75qaSDWe8: Refetching age-gated info webpage
[youtube] {18} signature length 106, html5 player vflset
[youtube] {137} signature length 106, html5 player vflset
[youtube] {248} signature length 106, html5 player vflset
[youtube] {399} signature length 106, html5 player vflset
[youtube] {136} signature length 106, html5 player vflset
[youtube] {247} signature length 102, html5 player vflset
[youtube] {398} signature length 106, html5 player vflset
[youtube] {135} signature length 106, html5 player vflset
[youtube] {244} signature length 106, html5 player vflset
[youtube] {397} signature length 106, html5 player vflset
[youtube] {134} signature length 106, html5 player vflset
[youtube] {243} signature length 106, html5 player vflset
[youtube] {396} signature length 102, html5 player vflset
[youtube] {133} signature length 106, html5 player vflset
[youtube] {242} signature length 102, html5 player vflset
[youtube] {395} signature length 102, html5 player vflset
[youtube] {160} signature length 106, html5 player vflset
[youtube] {278} signature length 106, html5 player vflset
[youtube] {394} signature length 106, html5 player vflset
[youtube] {140} signature length 106, html5 player vflset
[youtube] {249} signature length 106, html5 player vflset
[youtube] {250} signature length 106, html5 player vflset
[youtube] {251} signature length 106, html5 player vflset
[debug] Invoking downloader on u'https://r3---sn-4g5ednsd.googlevideo.com/videoplayback?expire=1584310484&ei=dFRuXqKOFpjH7gPDoKmIAg&ip=XXX.XXX.XXX.XXX&id=o-ALmu55S-PRxilyXdvzA9Lzr6nu7oOSMlJX9Fr3_zDJ9R&itag=251&source=youtube&requiressl=yes&mh=pT&mm=31%2C29&mn=sn-4g5ednsd%2Csn-4g5e6nle&ms=au%2Crdu&mv=m&mvi=2&pl=20&initcwndbps=651250&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4731620&dur=286.901&lmt=1540275483991092&mt=1584288757&fvip=3&keepalive=yes&fexp=23842630%2C23882514&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRgIhAIxYA4-C9kyTr_MVasPpTyFtmX2_bJH7b_-__CoeFZBiAiEA2-6DnyHiHI7-v2bnsSr2baY0BgOXpDdlnsDQNZn3obs%3D&sig==VGq1h6CwHZmDtP5wKH4RCLWPZokbYNJ2N44o00txaBDQICsHcKZA_9DtwtBqEFADa8I6Yi7kF-gvvfuDGHgIr5d3AgIQRwMGkhKDADh&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "./youtube-dl-org/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "./youtube-dl-org/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "./youtube-dl-org/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden

Description

I get this error message with some YouTube videos but I haven't figured out why this videos don't work. The videos can be played in the browser.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 15, 2020

You must authenticate for age gated videos.

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.