Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Youtube] download error: Unable to extract yt initial data #32826

Closed
6 tasks done
TataneSan opened this issue Jun 27, 2024 · 7 comments
Closed
6 tasks done

[Youtube] download error: Unable to extract yt initial data #32826

TataneSan opened this issue Jun 27, 2024 · 7 comments

Comments

@TataneSan
Copy link

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2021.12.17
  • 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

PASTE VERBOSE LOG HERE

Description

Hi, I've been trying to download some videos of some randoms YouTube channel, but it seems that there is a problem with it. I have the error "Unable to extract yt initial data".

@dirkf
Copy link
Contributor

dirkf commented Jun 27, 2024

Review #30839 as asked to see if your problem is one of the Known issues and if it is solved in the master code and nightly release (hint: it appears to be).

If not, you need to PASTE VERBOSE LOG HERE, as the issue template expects, for further help

@dirkf dirkf changed the title Youtube download error [Youtube] download error: Unable to extract yt initial data Jun 27, 2024
@Deepa-Aru

This comment was marked as off-topic.

@Deepa-Aru

This comment was marked as off-topic.

@dirkf

This comment was marked as resolved.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2024
@dirkf dirkf reopened this Jun 30, 2024
@dirkf
Copy link
Contributor

dirkf commented Jul 1, 2024

@TataneSan ?

@bpfaust
Copy link

bpfaust commented Jan 13, 2025

Not OP but @dirkf same issue happening for me:

➜  ~ youtube-dl -x -f m4a/bestaudio -o '<SAVE_PATH_HERE>' --rm-cache-dir --user-agent "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36" --verbose https://music.youtube.com/playlist\?list\=OLAK5uy_knVyH4nmb1XF6igxBe6D3pyejUa2RHnRY
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-x', '-f', 'm4a/bestaudio', '-o', '<SAVE_PATH_HERE>', '--rm-cache-dir', '--user-agent', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36', '--verbose', 'https://music.youtube.com/playlist?list=OLAK5uy_knVyH4nmb1XF6igxBe6D3pyejUa2RHnRY']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2025.01.06 [1036478d1]
[debug] ** This version was built from the latest master code at https://github.com/ytdl-org/youtube-dl.
[debug] ** For support, visit the main site.
[debug] Python 3.11.4 (CPython arm64 64bit) - macOS-14.6.1-arm64-arm-64bit - OpenSSL 3.4.0 22 Oct 2024
[debug] exe versions: ffmpeg 7.1, ffprobe 7.1
[debug] Proxy map: {}
Removing cache dir <CACHE_PATH> ..
[youtube:tab] OLAK5uy_knVyH4nmb1XF6igxBe6D3pyejUa2RHnRY: Downloading webpage
ERROR: Unable to extract yt initial data; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see  https://github.com/ytdl-org/youtube-dl/#user-content-installation  on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
Traceback (most recent call last):
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/YoutubeDL.py", line 879, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/YoutubeDL.py", line 975, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/extractor/common.py", line 571, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/extractor/youtube.py", line 3550, in _real_extract
    data = self._extract_yt_initial_data(item_id, webpage)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/extractor/youtube.py", line 340, in _extract_yt_initial_data
    self._search_regex(
  File "~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/youtube_dl/extractor/common.py", line 1101, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract yt initial data; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see  https://github.com/ytdl-org/youtube-dl/#user-content-installation  on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output.

@dirkf
Copy link
Contributor

dirkf commented Jan 13, 2025

Your log doesn't match OP's. Basically, you need the full fix for #32905 ut even then the result could be like that with yt-dlp 2024.12.06:

...
WARNING: [youtube:tab] YouTube Music is not directly supported. Redirecting to https://www.youtube.com/playlist?list=OLAK5uy_knVyH4nmb1XF6igxBe6D3pyejUa2RHnRY
[youtube:tab] OLAK5uy_knVyH4nmb1XF6igxBe6D3pyejUa2RHnRY: Downloading webpage
WARNING: [youtube:tab] YouTube said: INFO - 10 unavailable videos are hidden
...

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants