yt-dlp: [Youtube] "unable to download video data: HTTP Error 403: Forbidden" with cookies
🚨 click here to see the current status of this issue 🚨
- I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- I’m reporting that yt-dlp is broken on a supported site
- I’ve verified that I have updated yt-dlp to nightly or master (update instructions)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
Worldwide
Provide a description that is worded well enough to be understood
After downloading about 20-60 MB of data from any video this error will appears: HTTP Error 403: Forbidden
Tested on nightly(pip) and stable(Arch Linux) Cookies are fresh and valid.
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>) - If using API, add
'verbose': TruetoYoutubeDLparams instead - Copy the WHOLE output (starting with
[debug] Command-line config) and insert it below
Complete Verbose Output
[debug] Command-line config: ['--cookies', '[REDACTED]/drive-d/Sync/cookies.txt', '-Uv', 'https://www.youtube.com/watch?v=UAxq_GlB99s']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2025.01.12.232754 from yt-dlp/yt-dlp-nightly-builds [dade5e35c] (pip)
[debug] Python 3.13.1 (CPython x86_64 64bit) - Linux-6.6.70-1-lts-x86_64-with-glibc2.40 (OpenSSL 3.4.0 22 Oct 2024, glibc 2.40)
[debug] exe versions: ffmpeg 7.1 (setts), ffprobe 7.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.12.14, mutagen-1.47.0, requests-2.32.3, sqlite3-3.47.2, urllib3-2.3.0, websockets-14.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2025.01.12.232754 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2025.01.12.232754 from yt-dlp/yt-dlp-nightly-builds)
[debug] [youtube] Found YouTube account cookies
[youtube] Extracting URL: https://www.youtube.com/watch?v=UAxq_GlB99s
[youtube] UAxq_GlB99s: Downloading webpage
[youtube] UAxq_GlB99s: Downloading web creator player API JSON
[youtube] UAxq_GlB99s: Downloading tv player API JSON
[debug] Loading youtube-nsig.0b866fa6 from cache
[debug] [youtube] Decrypted nsig NZPYtXh_YfIXrAqj => nPp_4IBNNtvQDw
[debug] Loading youtube-nsig.0b866fa6 from cache
[debug] [youtube] Decrypted nsig beQxuKtXpbM6_7Kb => 1fF0ngFPof7QLg
[debug] Loading youtube-nsig.0b866fa6 from cache
[debug] [youtube] Decrypted nsig ZI9L3dtD7sA2p04T => uRl6jgpioMsVFA
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] UAxq_GlB99s: Downloading 1 format(s): 308+251
[debug] Invoking http downloader on "https://rr3---sn-5go7ynl6.googlevideo.com/videoplayback?expire=1736926680&ei=eBGHZ8TJF63X2roP2vSUuAg&ip=193.138.218.226&id=o-AKSa0zBbtQUK9HKCUjVodpgUofJ59b_pQqMpNsHQFoHB&itag=308&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1736905080%2C&mh=an&mm=31%2C26&mn=sn-5go7ynl6%2Csn-i5heen7d&ms=au%2Conr&mv=m&mvi=3&pl=23&rms=au%2Cau&initcwndbps=2691250&siu=1&bui=AY2Et-O0_KMHtZ45NlKVPZBFl_i1LZEV1VqMLvRZlNcptzdEWdB5p-yhRq0mz6RCkmex9jloHA&spc=9kzgDelkruf37uWuEznsvCzOoCcaQc7Udm05Sfuihz17ha04RjdeZ0wDneN802H2nH3Qa-zkMaCpI4s&vprv=1&svpuc=1&mime=video%2Fwebm&ns=gYoeQ6Imniejh2VbjvtAO8gQ&rqh=1&gir=yes&clen=2754311051&dur=2995.999&lmt=1736884534511083&mt=1736904531&fvip=1&keepalive=yes&fexp=51326932%2C51335594%2C51353498%2C51384461&c=WEB_CREATOR&sefc=1&txp=330F224&n=1fF0ngFPof7QLg&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRgIhANqAMInjEDaryLaAyJkC4eW1sfGrICN2gnZqKJfm0cqCAiEAtLZ8L03Qm64OPvErZK1tPchmNJ77w6y_f3YYp6Kgbj8%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRgIhAI6p070BWbMz5V13a9UsLfsueb1Z3zA0PpM5yzll_uO7AiEA6mRgzmkfgUrp3jTalgkojl2NDMws-W_JW6zBNwrhWs4%3D"
[download] Destination: The Enemy finds their Spine : Manor Lords ep4 [UAxq_GlB99s].f308.webm
[download] 2.2% of 2.57GiB at 6.81MiB/s ETA 06:17ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 3474, in process_info
partial_success, real_download = self.dl(fname, new_info)
~~~~~~~^^^^^^^^^^^^^^^^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 3212, in dl
return fd.download(name, new_info, subtitle)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/downloader/common.py", line 464, in download
ret = self.real_download(filename, info_dict)
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/downloader/http.py", line 367, in real_download
establish_connection()
~~~~~~~~~~~~~~~~~~~~^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/downloader/http.py", line 118, in establish_connection
ctx.data = self.ydl.urlopen(request)
~~~~~~~~~~~~~~~~^^^^^^^^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 4175, in urlopen
return self._request_director.send(req)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/networking/common.py", line 117, in send
response = handler.send(request)
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/networking/_helper.py", line 208, in wrapper
return func(self, *args, **kwargs)
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/networking/common.py", line 340, in send
return self._send(request)
~~~~~~~~~~^^^^^^^^^
File "[REDACTED]/.cache/pypoetry/virtualenvs/ytd-OUG6QLD_-py3.13/lib/python3.13/site-packages/yt_dlp/networking/_requests.py", line 365, in _send
raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 18 (5 by maintainers)
Links to this issue
Commits related to this issue
- [ie/youtube] Do not use `web_creator` as a default client (#12087) Closes #12085 Authored by: bashonly — committed to yt-dlp/yt-dlp by bashonly 2 years ago
- [ie/youtube] Do not use `web_creator` as a default client (#12087) Closes #12085 Authored by: bashonly — committed to vladisslav2011/yt-dlp by bashonly 2 years ago
- [ie/youtube] Do not use `web_creator` as a default client (#12087) Closes #12085 Authored by: bashonly — committed to subrat-lima/yt-dlp by bashonly 2 years ago
It looks like the
web_creatorplayer client now requires a PO token. This means that you will get the 403 error if you try to downloadweb_creator/WEB-Cformats without passing a validpo_tokenextractor-arg.Note that yt-dlp currently uses
web_creatorby default only if you pass cookies. So if you are reading this and you are not passing cookies (and not passing any--extractor-args), then this issue does not apply to you.This is the workaround for time being:
Again, this ☝️ is only necessary if you are passing cookies.
@BagronkeN All good. Sorry if I came across as harsh, and thanks for the report. Also thank you to @vnvx
@bashonly All good! Thank you so much for the super quick response, and for finding a workaround almost instantly. Absolute stellar job!
I can confirm that –extractor-args “youtube:player_client=default,-web_creator” works for all my clients.
@mabra , for me it’s the opposite. Version 2024-12-23 worked fine without cookies, but after updating to 2025-01-12 it no longer works:
I use Kubuntu 22.04
This issue supposedly only affects downloads with cookies. And with cookies the argument above makes it work for me on local machines (I do not use yt-dlp on any cloud platforms).
Using the latest nightly without cookies still works for me without adding the argument. Granted, you’d then only be able to download things that doesn’t need cookies, obviously. Testing it with the example video above is a good idea.
If it doesn’t work on your cloud providers, even without cookies, it’s probably not connected to this issue, at least in its current form. If you have new information that could expand the issue, please add more information (and logs) about it.