yt-dlp: `yt-dlp -x $URL` not working: 404 not found error
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- I’m reporting a bug unrelated to a specific 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
Provide a description that is worded well enough to be understood
Tried to run this to extract audio but it didn’t work 😦
yt-dlp -x "https://www.youtube.com/watch\?v\=nJKuaASTx1g"
[generic] Extracting URL: https://www.youtube.com/watch\?v\=nJKuaASTx1g
[generic] watch\?v\=nJKuaASTx1g: Downloading webpage
ERROR: [generic] Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>)
Any advice on how to debug?
P.S. I tried to update because this checklist requires this preflight, to the nightly, but got these errors:
# To update to nightly from stable executable/binary:
yt-dlp --update-to nightly
# To install nightly with pip:
python3 -m pip install -U --pre yt-dlp[default]
Errors:
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
me@milaptop ~ yt-dlp -vU -x "https://www.youtube.com/watch\?v\=nJKuaASTx1g" 1 ↵ 10000 11:42:53
[debug] Command-line config: ['-vU', '-x', 'https://www.youtube.com/watch\\?v\\=nJKuaASTx1g']
[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@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (pip)
[debug] Python 3.12.3 (CPython x86_64 64bit) - macOS-14.4.1-x86_64-i386-64bit (OpenSSL 3.3.0 9 Apr 2024)
[debug] exe versions: ffmpeg 7.0 (setts), ffprobe 7.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, sqlite3-3.45.3, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[generic] Extracting URL: https://www.youtube.com/watch\?v\=nJKuaASTx1g
[generic] watch\?v\=nJKuaASTx1g: Downloading webpage
ERROR: [generic] Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>)
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 734, in extract
ie_result = self._real_extract(url)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/extractor/generic.py", line 2376, in _real_extract
full_response = self._request_webpage(url, video_id, headers=filter_dict({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 903, in _request_webpage
raise ExtractorError(errmsg, cause=err)
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 890, in _request_webpage
return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query, extensions))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 4131, in urlopen
return self._request_director.send(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/networking/common.py", line 115, in send
response = handler.send(request)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/networking/_helper.py", line 208, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/networking/common.py", line 335, in send
return self._send(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/yt-dlp/2024.4.9_1/libexec/lib/python3.12/site-packages/yt_dlp/networking/_requests.py", line 350, in _send
raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 404: Not Found
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (6 by maintainers)
No. Both single and double quotes work in zsh.
Any of these work. Just not escaping the characters and quoting.
Depends on what shell is being used. E.g. if it’s zsh, the
?does need to be escaped or quoted