yt-dlp: [youtube] "Video unavailable" with cookies - YouTube blocking accounts from web
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 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
No response
Provide a description that is worded well enough to be understood
Recently, YouTube has started blocking accounts that are used a lot with yt-dlp from loading videos through the /player endpoint. Blocked accounts will get “Video unavailable. This content isn’t available.” for all videos.
Blocked accounts can’t load videos in the website, but the Android app works fine (same account and IP were used for the following screenshots)
| WEB client | Latest stock YouTube client on Android |
|---|---|
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-from-browser', 'firefox', '-vU', 'dQw4w9WgXcQ']
[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@2024.05.30.232720 from yt-dlp/yt-dlp-nightly-builds (linux_exe)
[debug] Python 3.11.9 (CPython x86_64 64bit) - Linux-6.8.8-arch1-1-x86_64-with (OpenSSL 3.1.4 24 Oct 2023)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.32.3, secretstorage-3.3.3, sqlite3-3.44.2, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/kuylar/.mozilla/firefox/mtlek44v.default-release-1708816247016/cookies.sqlite"
Extracted 2968 cookies from firefox
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1820 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.05.30.232720 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.05.30.232720 from yt-dlp/yt-dlp-nightly-builds)
[youtube] Extracting URL: dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] dQw4w9WgXcQ: Downloading ios player API JSON
ERROR: [youtube] dQw4w9WgXcQ: Video unavailable. This content isn’t available.
File "yt_dlp/extractor/common.py", line 734, in extract
File "yt_dlp/extractor/youtube.py", line 4248, in _real_extract
File "yt_dlp/extractor/common.py", line 1257, in raise_no_formats
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 28 (10 by maintainers)
@aniqueta
I would avoid using cookies entirely and use https://github.com/coletdjnz/yt-dlp-youtube-oauth2 instead.EDIT: oauth is really no different than cookiesYou could pass auth and write a txt file of video links from the private playlist with:
Then to download them, do not pass auth and feed the list back to yt-dlp with:
What about using a VPN? I am browsing the internet at home anyway using Wireguard. So I installed it on my server, which runs yt-dlp, but I am still getting the bot message, strange?
@MJBlack9000 if you pass
--cookies-from-browser firefoxto yt-dlp, does that work around the “sign in” error?My IP is now limited to 40 kb/s (ios client, no cookie).
If anyone has a solution, I’m interested (there’s no question of using a proxy, since all of them are or will be affected by this problem). Personally, I have no idea how to get around this.
It looks like youtube has won this battle.
Fewer formats, for sure, but not “way” fewer. Many of the iOS client formats are just HLS variants of the WEB formats (exact same quality but different protocol and format id).