yt-dlp: [YouTube] 403 for a short period of time(a few seconds), then the link can be downloaded normally
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, the FAQ, and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
US
Provide a description that is worded well enough to be understood
I’m not sure what has changed recently on YouTube. After getting the download link, there will be a 403 status for a few seconds, and then it can be downloaded normally. I have verified that this problem exists in all clients that require js player, but not android_vr, and they all appear in itag 18 format. This has nothing to do with po token, because I have tried using po token as well and it still doesn’t work
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
/Users/xxxx/Documents/code/yt-dlp-master/venv/bin/python /Users/xxxx/Documents/yt-dlp-master/yt_dlp/__main__.py https://youtu.be/SinDUMJmsCU?si=y5AESP3GgXKCNfp0 --extractor-args youtube:player_client=WEB -vU --no-check-certificates --cookies-from-browser chrome
/Users/xxxx/Documents/code/yt-dlp-master/venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
[debug] Command-line config: ['https://youtu.be/SinDUMJmsCU?si=y5AESP3GgXKCNfp0', '--extractor-args', 'youtube:player_client=WEB', '-vU', '--no-check-certificates', '--cookies-from-browser', 'chrome']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version stable@2025.03.27 from yt-dlp/yt-dlp [48be862b3]
[debug] Lazy loading extractors is disabled
[debug] Python 3.9.6 (CPython arm64 64bit) - macOS-15.1.1-arm64-arm-64bit (LibreSSL 2.8.3)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0 (unsupported), sqlite3-3.43.2, urllib3-2.2.1, websockets-12.0 (unsupported)
[debug] Proxy map: {}
Extracting cookies from chrome
[debug] Extracting cookies from: "/Users/xxxx/Library/Application Support/Google/Chrome/Profile 10/Cookies"
[debug] using find-generic-password to obtain password from OSX keychain
Extracted 1207 cookies from chrome
[debug] cookie version breakdown: {'v10': 1225, 'other': 0, 'unencrypted': 0}
[debug] Request Handlers: urllib
[debug] Plugin directories: none
[debug] Loaded 1849 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2025.03.27 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2025.03.27 from yt-dlp/yt-dlp)
[debug] [youtube] Found YouTube account cookies
[youtube] Extracting URL: https://youtu.be/SinDUMJmsCU?si=y5AESP3GgXKCNfp0
[youtube] SinDUMJmsCU: Downloading webpage
[debug] [youtube] Extracting signature function js_20830619_106
[debug] Loading youtube-sigfuncs.js_20830619_106 from cache
[debug] Loading youtube-nsig.20830619 from cache
[debug] [youtube] Decrypted nsig VhXYdXVUoPzvwhfPZf => 4sJa79TOsDHnqg
[debug] [youtube] Decrypted nsig Xyv70ChVs7TUyOwUnV => rtNuS7IXvJsRjw
[debug] [youtube] SinDUMJmsCU: web client https formats require a GVS PO Token which was not provided. They will be skipped as they may yield HTTP Error 403. You can manually pass a GVS PO Token for this client with --extractor-args "youtube:po_token=web.gvs+XXX". For more information, refer to https://github.com/yt-dlp/yt-dlp/wiki/PO-Token-Guide . To enable these broken formats anyway, pass --extractor-args "youtube:formats=missing_pot"
[debug] [youtube] Extracting signature function js_20830619_102
[debug] Loading youtube-sigfuncs.js_20830619_102 from cache
[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: best/bestvideo+bestaudio
[debug] Invoking http downloader on "https://rr5---sn-i3b7knld.googlevideo.com/videoplayback?expire=1743429736&ei=B0zqZ86wJr_02roPtuLQyQE&ip=152.104.9.253&id=o-ACq6hOuk6b39TDKcpw20O42bUhNHllW6dsRqo94pR10U&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1743408135%2C&mh=1g&mm=31%2C29&mn=sn-i3b7knld%2Csn-i3belnlz&ms=au%2Crdu&mv=m&mvi=5&pl=19&rms=au%2Cau&initcwndbps=2208750&siu=1&bui=AccgBcOD9jvW676IXMfcYSxvYgYIhIYaHtlNVYDLCgGBPvDO6SIK_5HLVDGMCns2kDm3tVz9Wg&spc=_S3wKnX4PWp9xnwChikDtFS3v_QOIETtD83UCBaKjZzdZGPrPJTbvLwNcTkJXx_T7QotAFSG4EfXaaGDnVxJ77ms1-UGwShE05Z7rQ&vprv=1&svpuc=1&mime=video%2Fmp4&ns=goDC08rLem8Jc63fZlCl6akQ&rqh=1&gir=yes&clen=10622575&ratebypass=yes&dur=212.346&lmt=1743248299394358&mt=1743407585&fvip=2&fexp=51355912%2C51435733&c=WEB&sefc=1&txp=5538534&n=4sJa79TOsDHnqg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AFVRHeAwRgIhALjBjG5nkXk9iUJAKpy2uO8zNhrA5oe7zMkS05A7usjRAiEAljhD-GUXSJVIh8Xz0wavWkqvxOOOMl6pnQIhyBrMDBg%3D&sig=AJfQdSswRQIhAP4QwJ0GkgpA562h0siaNE02fW2Zttzz9nN90pn2y5YyAiB166zmfB-RcxaPPnLP1Pkj_POAuHyWoQ6HQmy_DhWnHg%3D%3D"
[info] SinDUMJmsCU: Downloading 1 format(s): 18
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/networking/_urllib.py", line 400, in _send
res = opener.open(urllib_req, timeout=self._calculate_timeout(request))
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 555, in error
result = self._call_chain(*args)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 747, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/YoutubeDL.py", line 3508, in process_info
success, real_download = self.dl(temp_filename, info_dict)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/YoutubeDL.py", line 3228, in dl
return fd.download(name, new_info, subtitle)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/downloader/common.py", line 468, in download
ret = self.real_download(filename, info_dict)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/downloader/http.py", line 367, in real_download
establish_connection()
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/downloader/http.py", line 118, in establish_connection
ctx.data = self.ydl.urlopen(request)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/YoutubeDL.py", line 4186, in urlopen
return self._request_director.send(req)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/networking/common.py", line 117, in send
response = handler.send(request)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/networking/_helper.py", line 208, in wrapper
return func(self, *args, **kwargs)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/networking/common.py", line 359, in send
return self._send(request)
File "/Users/xxxx/Documents/yt-dlp-master/yt_dlp/networking/_urllib.py", line 405, in _send
raise HTTPError(UrllibResponseAdapter(e.fp), redirect_loop='redirect error' in str(e)) from e
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden
Process finished with exit code 1
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (4 by maintainers)
@yaahx