Closed danny83x1 closed 1 year ago
Available version: stable@2023.07.06, Current version: stable@2023.03.04 ERROR: You installed yt-dlp with pip or using the wheel from PyPi; Use that to update
same problem, same solution
Solution:
Update yt-dlp! or if already on version 2023.07.06
, then show verbose log
Available version: stable@2023.07.06, Current version: stable@2023.03.04 ERROR: You installed yt-dlp with pip or using the wheel from PyPi; Use that to update
@bashonly, Thank you for reminding me. I had been trying to determine for the past few weeks whether the issue was occurring because of me, the ISP, or not. I had almost lost hope, but thanks to you, it's working now.
Shell code to visualize the issue:
for i in {1..100}
do
url=$(yt-dlp --get-url izQsgE0L450 --format 18)
curl -Is $url | head -n 1
done
HTTP/1.1 302 Found
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
^C
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
^C
Gonna make this a site-bug
issue so that it is documented somewhere.
These Youtube 403 errors are caused by fetching Android client formats using the old player params. This was fixed by 81ca451480051d7ce1a31c017e005358345a9149
@immibis
Update yt-dlp! or if already on version
2023.07.06
, then show verbose log
I said, same solution. Updating fixed it.
Solution:
Update yt-dlp! or if already on version
2023.07.06
, then show verbose log
Thanks, I installed the new version without PIP and the problem was solved.
I also have this problem but when i try to update it says I installed with pip even though i used the release binaries ???
nvm I found it
How did you fix it?
You need to update using pip: pip install --upgrade yt-dlp
I'm using 2023.10.13
but sill got the same error
$ yt-dlp -v -f 137 'https://www.youtube.com/watch?v=4NRXx6U8ABQ'
[debug] Command-line config: ['-v', '-f', '137', 'https://www.youtube.com/watch?v=4NRXx6U8ABQ']
[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.10.13 [b634ba742] (pip)
[debug] Python 3.8.3 (CPython x86_64 64bit) - macOS-10.16-x86_64-i386-64bit (OpenSSL 1.1.1g 21 Apr 2020)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-3.31.1, websockets-10.4, xattr-0.9.9
[debug] Proxy map: {}
[debug] Loaded 1890 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=4NRXx6U8ABQ
[youtube] 4NRXx6U8ABQ: Downloading webpage
[youtube] 4NRXx6U8ABQ: Downloading ios player API JSON
[youtube] 4NRXx6U8ABQ: Downloading android player API JSON
[youtube] 4NRXx6U8ABQ: 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
[info] 4NRXx6U8ABQ: Downloading 1 format(s): 137
[debug] Invoking http downloader on "https://rr2---sn-xaxjugvonx8a0ni-0qwe.googlevideo.com/videoplayback?expire=1697999749&ei=JRc1ZfPRLpK-0u8PtIGx6Ao&ip=31.43.231.233&id=o-ABLi_XEk6JIVf1Fvg1kaU4avKPAdx4tVbYBIYVjYOduU&itag=137&source=youtube&requiressl=yes&mh=j6&mm=31%2C29&mn=sn-xaxjugvonx8a0ni-0qwe%2Csn-3c27sn7e&ms=au%2Crdu&mv=m&mvi=2&pl=23&gcr=ua&initcwndbps=1037500&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=90125888&dur=262.512&lmt=1653320570339130&mt=1697977742&fvip=5&keepalive=yes&fexp=24007246&beids=24350018&c=IOS&txp=4535434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AGM4YrMwRAIgXncHhynEOuKwaRvvX5A_Hk-xfXtqLFfEFWlTPFCmChoCIDIx9Az1BHIqYwoaLNfDnixWsVeyXpWTkhvTkLVEijVK&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AK1ks_kwRAIgYWlhHm7hFKfZtizRf3p1uAIKWo4DFwxFv-GntikCMzQCIAfy4dsbgK4T9zONOK0M3JsrEjtd7L-8mPn8witywpil"
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/networking/_urllib.py", line 410, in _send
res = opener.open(urllib_req, timeout=float(request.extensions.get('timeout') or self.timeout))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, 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 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 4051, in urlopen
return self._request_director.send(req)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/networking/common.py", line 114, in send
response = handler.send(request)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/networking/_helper.py", line 204, in wrapper
return func(self, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/networking/common.py", line 325, in send
return self._send(request)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/networking/_urllib.py", line 415, 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 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 3387, in process_info
success, real_download = self.dl(temp_filename, info_dict)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 3108, in dl
return fd.download(name, new_info, subtitle)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/downloader/common.py", line 455, in download
ret = self.real_download(filename, info_dict)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/downloader/http.py", line 364, in real_download
establish_connection()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/downloader/http.py", line 120, in establish_connection
ctx.data = self.ydl.urlopen(request)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 4070, in urlopen
raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 403: Forbidden
Did I miss something ?
@Alexhha if you are on a data center IP or have been downloading an unusually large volume of videos, it is likely #7860 (your IP has been blocked by youtube)
@bashonly
It seems you were right, I tried the same command on ec2 and it worked
upgrade
You might need/want to run pip install --upgrade yt-dlp
in a venv.
i also got this error using debian 12 without having downloaded >5 videos, i proved using the latest stable and the latest non-stable and neither worked.
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Please make sure the question is worded well enough to be understood
I'm trying to download this video and I always get this error, this happened a couple of days ago,
https://www.youtube.com/watch?v=AsDxw522Nec
my command:
yt-dlp --force-overwrites -f 'bestvideo[height=360][ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 "https://www.youtube.com/watch?v=AsDxw522Nec" --output /**/***/file.mp4"
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output