ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.44k stars 10.04k forks source link

Fix Support for Egghead.io #30740

Open nikolai-mitnik opened 2 years ago

nikolai-mitnik commented 2 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--add-header=Cookie:ahoy_visitor=xxxxxxxxxxxxxxxx', '-cio', '%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s', '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', 'https://egghead.io/courses/build-a-twelve-factor-node-js-app-with-docker']
[debug] Adding header from command line option Cookie:ahoy_visitor=xxxxxxxxxxxxxxxxxxx
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.2 (CPython) - macOS-12.2.1-x86_64-i386-64bit
[debug] exe versions: ffmpeg 5.0, ffprobe 5.0
[debug] Proxy map: {}
[egghead:course] build-a-twelve-factor-node-js-app-with-docker: Downloading course lessons JSON
[egghead:course] build-a-twelve-factor-node-js-app-with-docker: Downloading course JSON
[download] Downloading playlist: Build a Twelve-Factor Node.js App with Docker
[egghead:course] playlist Build a Twelve-Factor Node.js App with Docker: Collected 13 video ids (downloading 13 of them)
[download] Downloading video 1 of 13
[egghead:lesson] egghead-summary-concepts-of-the-twelve-factor-app: Downloading lesson JSON
[egghead:lesson] 2671: Downloading m3u8 information
[egghead:lesson] 2671: Downloading MPD manifest
[debug] Invoking downloader on 'https://d2c5owlt6rorc3.cloudfront.net/summary-concepts-of-the-twelve-factor-app-4ee27cc221/summary-concepts-of-the-twelve-factor-app-4ee27cc221.mpd'
[dashsegments] Total fragments: 10
[download] Destination: Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-da4e12d0-f5c0-4e9c-a3ae-74fada23aba8.mp4
[download] 100% of 4.18MiB in 00:02
[debug] Invoking downloader on 'https://d2c5owlt6rorc3.cloudfront.net/summary-concepts-of-the-twelve-factor-app-4ee27cc221/summary-concepts-of-the-twelve-factor-app-4ee27cc221.mpd'
[dashsegments] Total fragments: 10
[download] Destination: Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-11801046-3be1-4b2a-9654-6b1a942dd295.m4a
[download] 100% of 529.38KiB in 00:01
[ffmpeg] Merging formats into "Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-da4e12d0-f5c0-4e9c-a3ae-74fada23aba8.mp4' -i 'file:Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-11801046-3be1-4b2a-9654-6b1a942dd295.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.temp.mp4'
Deleting original file Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-da4e12d0-f5c0-4e9c-a3ae-74fada23aba8.mp4 (pass -k to keep)
Deleting original file Build a Twelve-Factor Node.js App with Docker/01-Summary & Concepts of the Twelve-Factor App.fdash-11801046-3be1-4b2a-9654-6b1a942dd295.m4a (pass -k to keep)
[download] Downloading video 2 of 13
[egghead:lesson] git-use-git-flow-as-a-reliable-version-control-model: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 3 of 13
[egghead:lesson] npm-pin-down-npm-package-versions-with-yarn-lock: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 4 of 13
[egghead:lesson] node-js-manage-configuration-values-with-environment-variables: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 5 of 13
[egghead:lesson] express-proxy-requests-for-local-and-remote-service-parity: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 6 of 13
[egghead:lesson] docker-build-release-and-run-containers-with-docker-compose: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 7 of 13
[egghead:lesson] docker-run-stateless-docker-containers: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 8 of 13
[egghead:lesson] docker-export-services-with-docker-port-binding: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 9 of 13
[egghead:lesson] nginx-scale-docker-horizontally-with-nginx-load-balancing: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 10 of 13
[egghead:lesson] docker-ensure-containers-run-with-high-availability: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 11 of 13
[egghead:lesson] docker-run-consistent-dev-stage-prod-docker-environments: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 12 of 13
[egghead:lesson] docker-pipe-log-output-to-stdout-with-docker: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 13 of 13
[egghead:lesson] docker-run-one-off-docker-containers: Downloading lesson JSON
ERROR: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'
Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/egghead.py", line 109, in _real_extract
    for _, format_url in lesson['media_urls'].items():
KeyError: 'media_urls'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 547, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('media_urls')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Finished downloading playlist: Build a Twelve-Factor Node.js App with Docker

Description

Only download first video of the playlists is the free one, however I am using a paid account, and passing token or cookies, none of them works, I can pass a login link for you to debug, thanks in advance!

nikolai-mitnik commented 2 years ago

Update: Just tried with Master and the same issue is happening there also.

dirkf commented 2 years ago

Try with --playlist-items 2 --write-pages and then let's look at the downloaded page for git-use-git-flow-as-a-reliable-version-control-model.

nikolai-mitnik commented 2 years ago

Thanks for your reply @dirkf , here is the result.

dump files.zip

dirkf commented 2 years ago

So no video links in the git-use-git-flow-as-a-reliable-version-control-model.dump JSON. I assume there is video in this lesson: sometimes these instructional sites just have text and individual slides in a lesson.

What is the result of fetching this JSON in your logged-in browser session?

https://app.egghead.io/api/v1/lessons/git-use-git-flow-as-a-reliable-version-control-model

nikolai-mitnik commented 2 years ago

In this case all are videos, but it seems egghead made a good work to hide their content, here is the data you asked and also some extra data that could give more hints of the videos.

MoreData.zip

nikolai-mitnik commented 2 years ago

Ok so I found an audio and a video, I think cloudfront is configured to serve this files only a couple minutes or so.

audio file Request URL: https://d2c5owlt6rorc3.cloudfront.net/tools-use-git-flow-as-a-reliable-version-control-model-99457b3048/audio_tools-use-git-flow-as-a-reliable-version-control-model-99457b3048.m3u8 video file Request URL: https://d2c5owlt6rorc3.cloudfront.net/tools-use-git-flow-as-a-reliable-version-control-model-99457b3048/video_720p_tools-use-git-flow-as-a-reliable-version-control-model-99457b3048.m3u8

dirkf commented 2 years ago

What about this from your logged-in session: https://app.egghead.io/api/v1/lessons/git-use-git-flow-as-a-reliable-version-control-model/media

nikolai-mitnik commented 2 years ago

I logged in opened the video lesson, and then accessed that path and it's an empty object {}

dirkf commented 2 years ago

OK, looks like it needs something more than just cookies and Referer, then.

yt-dl's extraction first runs the EggheadCourse extractor, which

Next yt-dl processes the playlist and invokes the EggheadLesson extractor on each lesson URL, which:

We don't get a media_urls member for the non-free lesson example, at least not for me when not logged in, and apparently not for you using yt-dl with logged-in cookies.

Probably we should be sending some additional header(s) or making some intermediate request to satisfy the Egghead fairy. You might be able to find the /api/v1/lessons/... request in the devtools when accessing the lesson https://app.egghead.io/lessons/git-use-git-flow-as-a-reliable-version-control-model. If so, you might use the right-button 'Save as HAR' option to save the details of the request.