DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Provide a description that is worded well enough to be understood
$ yt-dlp https://www.youtube.com/watch?v=nJ6A6GC_ki4
[youtube] Extracting URL: https://www.youtube.com/watch?v=nJ6A6GC_ki4
[youtube] nJ6A6GC_ki4: Downloading webpage
[youtube] nJ6A6GC_ki4: Downloading ios player API JSON
[youtube] nJ6A6GC_ki4: Downloading android player API JSON
[youtube] nJ6A6GC_ki4: Downloading m3u8 information
[info] nJ6A6GC_ki4: Downloading 1 format(s): 244+251
ERROR: unable to download video data: HTTP Error 403: Forbidden
Provide verbose output that clearly demonstrates the problem
Complete Verbose Output
$ yt-dlp -vU https://www.youtube.com/watch?v=nJ6A6GC_ki4
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=nJ6A6GC_ki4']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481]
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-5.15.0-73-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, secretstorage-3.3.1, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1863 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
yt-dlp is up to date (stable@2023.07.06)
[youtube] Extracting URL: https://www.youtube.com/watch?v=nJ6A6GC_ki4
[youtube] nJ6A6GC_ki4: Downloading webpage
[youtube] nJ6A6GC_ki4: Downloading ios player API JSON
[youtube] nJ6A6GC_ki4: Downloading android player API JSON
[youtube] nJ6A6GC_ki4: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] nJ6A6GC_ki4: Downloading 1 format(s): 244+251
[debug] Invoking http downloader on "https://rr2---sn-5hne6n6e.googlevideo.com/videoplayback?expire=1692195317&ei=lYXcZNyWCpuK6dsPiJGg-AI&ip=80.89.235.70&id=o-AECIz8FuVZ__W_EfhNGd0Ur8IEVQtwyI7kypC6j4Tr7O&itag=244&source=youtube&requiressl=yes&mh=MH&mm=31%2C26&mn=sn-5hne6n6e%2Csn-4g5edn6r&ms=au%2Conr&mv=u&mvi=2&pl=24&gcr=nl&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=12357755&dur=246.346&lmt=1575098546134993&mt=1692172857&fvip=2&keepalive=yes&fexp=24007246%2C24363392&c=IOS&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgO-WT4WtR7GwGTUM9uiMGZbPK9XOvrUr1wGYyy0bBvIoCIFwxrI0FPp9Fag6KGjJZQMnC66QMC0qUYMHWWznZTmKv&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRQIhAKMiNOfsIDWyn-cD4aUaPHX_6iGLhIK4Wqidhh4bUtgZAiB_pHuBsf3atSGZKKBmcsjKNN4hrCwYMEIakqlMB-PtUQ%3D%3D"
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/networking/_urllib.py", line 438, in _send
res = opener.open(urllib_req, timeout=float(request.extensions.get('timeout') or self.timeout))
File "/usr/lib/python3.10/urllib/request.py", line 525, in open
response = meth(req, response)
File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
response = self.parent.error(
File "/usr/lib/python3.10/urllib/request.py", line 563, in error
return self._call_chain(*args)
File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.10/urllib/request.py", line 643, 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 "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 4059, in urlopen
return self._request_director.send(req)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/networking/common.py", line 114, in send
response = handler.send(request)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/networking/_helper.py", line 203, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/networking/common.py", line 325, in send
return self._send(request)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/networking/_urllib.py", line 443, 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
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3377, in process_info
partial_success, real_download = self.dl(fname, new_info)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3116, in dl
return fd.download(name, new_info, subtitle)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/common.py", line 455, in download
ret = self.real_download(filename, info_dict)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/http.py", line 364, in real_download
establish_connection()
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/downloader/http.py", line 120, in establish_connection
ctx.data = self.ydl.urlopen(request)
File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 4078, in urlopen
raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden
Youtube has been blocking data center IPs since May – your first
Ubuntu 20.04.5 LTS x86_64
log is an example of #7143And as of ~2 days ago, Youtube has started with a new kind of IP blocking that only applies to the
videoplayback
endpoint (format/stream URLs), which results in the 403 errors in your other logs. This IP blocking is impacting Piped as well, see https://github.com/TeamPiped/Piped/issues/2809Reminder that this issue is for version 2023.07.06+.
If you are on anything older, please update - you are running into a different issue that was already fixed in the previous release ahead of YouTube rolling out a change.
If someone can reproduce this issue on 2023.07.06+, please post a verbose log withalready got them. Dupes not needed--check-formats
so we can confirm the type of issue this is.Additional info: the issue in no-more. I guess the bans are just temporarily made by youtube. I also read a comment of someone who had a temporary ban too
https://github.com/LuanRT/YouTube.js Maybe use this API to download videos
I’ve been experiencing this issue and
--force-ipv4
works for me. This seems indeed a block from the Youtube side. To be clear, I have IPv6 configured properly.I have issues too, but only when using my IPv6. Switching to IPv4 (replace
-6
with-4
) works fine (though probably because only my IPv6 is blocked?). Opening youtube videos in a browser shows the video but it stays buffering forever (console shows 403s). Passing cookies worked yesterday but doesn’t any more. And idk how to enable/disable HTTP2.Also, while I’ve specified a format here, removing the format specifier just returns this:
This started happening to me yesterday. Is this related?
Just want to make sure. Are you all guys referring to
yt-dlp [URL]
command line? Or maybe you’re using its API in python? In such a case make sure that you alsopip install --upgrade yt-dlp
I think it has some trouble when fetching formats
I don’t download often and my VPS IP is still blocked.
I’ve experienced the same kind of blocking (403 on videoplayback if not logged in) from about two months on my home IP address, and had just been unblocked today. It seems that the blocking is temporary
具体错误信息如下:yt-dlp -vU https://www.youtube.com/watch?v=nJ6A6GC_ki4 --check-formats [debug] Command-line config: [‘-vU’, ‘https://www.youtube.com/watch?v=nJ6A6GC_ki4’, ‘–check-formats’] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.07.06 [b532a3481] (pip) [debug] Python 3.10.11 (CPython x86_64 64bit) - Linux-5.10.0-21-amd64-x86_64-with-glibc2.31 (OpenSSL 1.1.1n 15 Mar 2022, glibc 2.31) [debug] exe versions: ffmpeg 4.3.5-0, ffprobe 4.3.5-0 [debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3 [debug] Proxy map: {} [debug] Loaded 1855 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version: stable@2023.07.06, Current version: stable@2023.07.06 yt-dlp is up to date (stable@2023.07.06) [youtube] Extracting URL: https://www.youtube.com/watch?v=nJ6A6GC_ki4 [youtube] nJ6A6GC_ki4: Downloading webpage [youtube] nJ6A6GC_ki4: Downloading ios player API JSON [youtube] nJ6A6GC_ki4: Downloading android player API JSON [youtube] nJ6A6GC_ki4: Downloading m3u8 information [debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto [debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id [debug] Default format spec: bestvideo*+bestaudio/best [info] nJ6A6GC_ki4: Downloading 1 format(s): 244+251 [debug] Invoking http downloader on “https://rr1---sn-5hneknee.googlevideo.com/videoplayback?expire=1692886148&ei=JBDnZJKnCYG1-ga4uqLYAg&ip=50.7.204.18&id=o-AGR1YEIKRkhsf8-rZ_UIJSh8Zo-uPzbAvbUw8OZeZMYR&itag=244&source=youtube&requiressl=yes&mh=MH&mm=31%2C26&mn=sn-5hneknee%2Csn-4g5edn6r&ms=au%2Conr&mv=u&mvi=1&pl=23&gcr=us&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=12357755&dur=246.346&lmt=1575098546134993&mt=1692863804&fvip=2&keepalive=yes&fexp=24007246%2C51000022&beids=24350018&c=IOS&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgFDmBNnh4DMUj3C9oRG8vWTJiniAIaHhnAeCA2x7L5n0CIQCBL7BDvqyWgZ660QYm8Cpxc4vwE7dg2JROG_S7MEwtyQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRAIgYwiQlZQHm-FIWl1omj7nQ0Mts5Olt_kSTcjO_Q8QCPUCIAHKPY-Uk9x1khvYOSvmPucG-kTVAm6wAAqpNeP695K0” ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py”, line 3345, in process_info partial_success, real_download = self.dl(fname, new_info) File “/usr/local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py”, line 3084, in dl return fd.download(name, new_info, subtitle) File “/usr/local/lib/python3.10/site-packages/yt_dlp/downloader/common.py”, line 461, in download ret = self.real_download(filename, info_dict) File “/usr/local/lib/python3.10/site-packages/yt_dlp/downloader/http.py”, line 377, in real_download establish_connection() File “/usr/local/lib/python3.10/site-packages/yt_dlp/downloader/http.py”, line 129, in establish_connection ctx.data = self.ydl.urlopen(request) File “/usr/local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py”, line 3863, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File “/usr/local/lib/python3.10/urllib/request.py”, line 525, in open response = meth(req, response) File “/usr/local/lib/python3.10/urllib/request.py”, line 634, in http_response response = self.parent.error( File “/usr/local/lib/python3.10/urllib/request.py”, line 563, in error return self._call_chain(*args) File “/usr/local/lib/python3.10/urllib/request.py”, line 496, in _call_chain result = func(*args) File “/usr/local/lib/python3.10/urllib/request.py”, line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden
@Kuchizu Does it work in a browser? If yes, can you please test yt-dlp again, so we know it’s not just a random issue?
Not seen for me either on nightly:
Not seen for me with yt-dlp 2023.06.22 (but SOCS issue), nor with yt-dl master WIP with SOCS fix, using
--test
.I have the same issue. And it started yesterday. Even for videos that was already downloaded earlier I have this error:
ERROR: unable to download video data: HTTP Error 403: Forbidden
So, looking for solution/patch…
UPD: Was fixed after update to 2023.07.06 version. Thanks for update, guys!