Unable to extract yt initial data (and how to solve)
See original GitHub issueChecklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.06.06
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
C:\Program Files\youtube-dl>"%PROGRAMFILES%\youtube-dl\youtube-dl.exe" --cookies "%PROGRAMFILES%\youtube-dl\youtube.com_cookies.txt" --download-archive "%USERPROFILE%\Downloads\My Music3\youtube-dl_archive.txt" --verbose -o "%USERPROFILE%/Downloads/My Music3/%%(album_artist)s/%%(album)s (%%(release_year)s)/%%(disc_number)s-%%(track_number)02d - %%(artist)s - %%(track)s -- [%%(id)s] %%(title)s.%%(ext)s" -i -f "bestaudio" -x --audio-format "m4a" --audio-quality 256K https://music.youtube.com/playlist?list=PL1CiZP5wdD9lrmwfHr9OqijLM3eD6086Q
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'C:\\Program Files\\youtube-dl\\youtube.com_cookies.txt', '--download-archive', 'C:\\Users\\Ben\\Downloads\\My Music3\\youtube-dl_archive.txt', '--verbose', '-o', 'C:\\Users\\Ben/Downloads/My Music3/%%(album_artist)s/%%(album)s (%%(release_year)s)/%%(disc_number)s-%%(track_number)02d - %%(artist)s - %%(track)s -- [%%(id)s] %%(title)s.%%(ext)s', '-i', '-f', 'bestaudio', '-x', '--audio-format', 'm4a', '--audio-quality', '256K', 'https://music.youtube.com/playlist?list=PL1CiZP5wdD9lrmwfHr9OqijLM3eD6086Q']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: avconv v11.7, avprobe v11.7, ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube:tab] PL1CiZP5wdD9lrmwfHr9OqijLM3eD6086Q: Downloading webpage
ERROR: Unable to extract yt initial data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 534, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\youtube.py", line 2823, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\youtube.py", line 301, in _extract_yt_initial_data
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 1012, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract yt initial data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Description
After updating to the most recent version I got this error, the older version I used before worked properly. The error message could be more descriptive.
The problem was: old cookies. After I created a new youtube.com_cookies.txt file the problem was gone.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
sporadic error: Unable to extract yt initial data #28602 - GitHub
Checklist I'm reporting a broken site support I've verified that I'm running youtube-dl version 2021.03.31 I've checked that all provided ...
Read more >Youtube_dl : ERROR : YouTube said: Unable to extract video ...
The simplest & quickest way to solve this issue without running around and trying a thousand different solutions is to completely remove Youtube...
Read more >Unable to extract video data. Youtube-dl” error - Its Linux FOSS
Solution 1: Update youtube_dl. The first method to fix the error is to update your currently existing youtube-dl. Use the python “pip” keyword...
Read more >youtube-dl: ERROR: Unable to extract yt initial data
ERROR: Unable to extract yt initial data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version;
Read more >subject:"Bug#987226\: youtube\-dl\: ERROR\: Unable to extract yt ...
bugs.debian.org with problems. Bug#987226: youtube-dl: ERROR: Unable to extract yt initial data · 2021-04-20 Thread Holger Levsen.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If you provide cookies they’re always used. There could be a check on the page returned the first time cookies are sent.
You may have an improved cookie-free experience with this patch. I got to listing item 122 of the playlist before I cancelled (including eg 72 that otherwise wanted authentication).
So this issue can be closed right?