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 #25039

Closed
axet opened this issue Apr 27, 2020 · 4 comments
Closed

Youtube HTTP Error 403: Forbidden #25039

axet opened this issue Apr 27, 2020 · 4 comments

Comments

@axet
Copy link

@axet axet commented Apr 27, 2020

Youtube failed with HTTP 403 error

https://www.youtube.com/watch?v=nKyfohLjAt8

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.03.24
  • 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

axet@axet-laptop:~/Music$ youtube-dl -v https://www.youtube.com/watch?v=nKyfohLjAt8
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=nKyfohLjAt8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.16 (CPython) - Linux-5.4.0-0.bpo.4-amd64-x86_64-with-debian-10.3
[debug] exe versions: ffmpeg 4.1.4-1, ffprobe 4.1.4-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] nKyfohLjAt8: Downloading webpage
[youtube] {18} signature length 104, html5 player vflset
[youtube] {137} signature length 100, html5 player vflset
[youtube] {248} signature length 104, html5 player vflset
[youtube] {136} signature length 104, html5 player vflset
[youtube] {247} signature length 104, html5 player vflset
[youtube] {135} signature length 100, html5 player vflset
[youtube] {244} signature length 104, html5 player vflset
[youtube] {397} signature length 100, html5 player vflset
[youtube] {134} signature length 104, html5 player vflset
[youtube] {243} signature length 100, html5 player vflset
[youtube] {396} signature length 104, html5 player vflset
[youtube] {133} signature length 104, html5 player vflset
[youtube] {242} signature length 104, html5 player vflset
[youtube] {395} signature length 104, html5 player vflset
[youtube] {160} signature length 104, html5 player vflset
[youtube] {278} signature length 104, html5 player vflset
[youtube] {394} signature length 104, html5 player vflset
[youtube] {140} signature length 104, html5 player vflset
[youtube] {249} signature length 104, html5 player vflset
[youtube] {250} signature length 104, html5 player vflset
[youtube] {251} signature length 100, 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://r13---sn-axq7sn7z.googlevideo.com/videoplayback?expire=1588044353&ei=4U2nXoqMIoajyQXQuqO4Bw&ip=2001%3A470%3A28%3A6ed%3A%3Acc3&id=o-AJ6T1zVFxSr1nC2a8-1Q664xm621OyiEuYRRsSiMVaQz&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397&source=youtube&requiressl=yes&mh=_p&mm=31%2C26&mn=sn-axq7sn7z%2Csn-3c27sn7r&ms=au%2Conr&mv=m&mvi=12&nh=IgpwcjAxLmxlZDAzKgkxMjcuMC4wLjE%2CIgpwcjAyLmticDAzKgkxMjcuMC4wLjE&pl=48&initcwndbps=1722500&vprv=1&mime=video%2Fmp4&gir=yes&clen=915090984&dur=2618.880&lmt=1557070573241137&mt=1588022675&fvip=13&keepalive=yes&beids=9466588&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%2Cnh%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRQIhAOydYPLw0kTPdDtYTDYJAYwtk4zPH8m70bW_FVjqMXnwAiBUnMerd2Y3M_Wg9PlPsdLQaHyCr1MWbRc51YvIUCViIw%3D%3D&sig=aJpPlLswjAIgHRZ0uRZ9gcABlvnw_xJ3A9Awxt0_Pf_IwWyfKDifdnMCIEHjVqvcOERNP5QclOiNvcqIktNiLyyVhC0rTK1Jg4AN&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/home/axet/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1920, in process_info
    partial_success = dl(fname, new_info)
  File "/home/axet/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "/home/axet/bin/youtube-dl/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/home/axet/bin/youtube-dl/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/home/axet/bin/youtube-dl/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/home/axet/bin/youtube-dl/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


@VADemon
Copy link

@VADemon VADemon commented Apr 27, 2020

Same with https://www.youtube.com/watch?v=-pvl44Sd1vo which also happens to be a verified artist channel. Looks like they have a youtube-dl specific detection in place now. (Spoofing proper UA+giving cookies)

@triplesixman
Copy link

@triplesixman triplesixman commented Apr 27, 2020

try youtube-dl --rm-cache-dir

@VADemon
Copy link

@VADemon VADemon commented Apr 27, 2020

Works, thanks @titirino159. I overlooked this because it only triggered on that specific video+channel (everything else was downloading fine from my subs feed)

@axet axet closed this Apr 27, 2020
@ldexterldesign
Copy link

@ldexterldesign ldexterldesign commented Apr 29, 2020

👉 #23638

@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.