Repository: ytdl-org/youtube-dl

Issue:
Egghead still broken
<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.03.03. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [X] I'm reporting a broken site support
- [X] I've verified that I'm running youtube-dl version **2021.03.03**
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [X] I've searched the bugtracker for similar issues including closed ones


## Verbose log

<!--
Provide the complete verbose output of youtube-dl that clearly demonstrates the problem.
Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this:
 [debug] System config: []
 [debug] User config: []
 [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
 [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
 [debug] youtube-dl version 2021.03.03
 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
 [debug] Proxy map: {}
 <more lines>
-->

```
$ youtube-dl -v "https://egghead.io/courses/write-your-first-program-with-the-rust-language"

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://egghead.io/courses/write-your-first-program-with-the-rust-language']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.03
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-66-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[egghead:course] write-your-first-program-with-the-rust-language: Downloading course lessons JSON
[egghead:course] write-your-first-program-with-the-rust-language: Downloading course JSON
[download] Downloading playlist: Write Your First Program with the Rust Language
[egghead:course] playlist Write Your First Program with the Rust Language: Collected 15 video ids (downloading 15 of them)
[download] Downloading video 1 of 15
ERROR: no suitable InfoExtractor for URL https://app.egghead.io/lessons/rust-install-rust
  File "/home/user/.local/bin/youtube-dl", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/__init__.py", line 475, in main
    _real_main(argv)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/__init__.py", line 465, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 2055, in download
    res = self.extract_info(
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 799, in extract_info
    return self.__extract_info(url, ie, download, extra_info, process)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 838, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 924, in process_ie_result
    return self.__process_playlist(ie_result, download)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 1058, in __process_playlist
    entry_result = self.__process_iterable_entry(entry, download, extra)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 1067, in __process_iterable_entry
    return self.process_ie_result(
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 876, in process_ie_result
    return self.extract_info(ie_result['url'],
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 801, in extract_info
    self.report_error('no suitable InfoExtractor for URL %s' % url)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 628, in report_error
    self.trouble(error_message, tb)
  File "/home/user/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 590, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
```


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

https://github.com/ytdl-org/youtube-dl/pull/28038 fixed the URL, but I assume somewhere it's still not changed to the new URL.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/egghead.py b/youtube_dl/extractor/egghead.py
--- a/youtube_dl/extractor/egghead.py
+++ b/youtube_dl/extractor/egghead.py
@@ -22,16 +22,19 @@ def _call_api(self, path, video_id, resource, fatal=True):
 class EggheadCourseIE(EggheadBaseIE):
     IE_DESC = 'egghead.io course'
     IE_NAME = 'egghead:course'
-    _VALID_URL = r'https://egghead\.io/courses/(?P<id>[^/?#&]+)'
-    _TEST = {
+    _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)'
+    _TESTS = [{
         'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript',
         'playlist_count': 29,
         'info_dict': {
-            'id': '72',
+            'id': '432655',
             'title': 'Professor Frisby Introduces Composable Functional JavaScript',
             'description': 're:(?s)^This course teaches the ubiquitous.*You\'ll start composing functionality before you know it.$',
         },
-    }
+    }, {
+        'url': 'https://app.egghead.io/playlists/professor-frisby-introduces-composable-functional-javascript',
+        'only_matching': True,
+    }]
 
     def _real_extract(self, url):
         playlist_id = self._match_id(url)
@@ -65,7 +68,7 @@ def _real_extract(self, url):
 class EggheadLessonIE(EggheadBaseIE):
     IE_DESC = 'egghead.io lesson'
     IE_NAME = 'egghead:lesson'
-    _VALID_URL = r'https://egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'
+    _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'
     _TESTS = [{
         'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box',
         'info_dict': {
@@ -88,6 +91,9 @@ class EggheadLessonIE(EggheadBaseIE):
     }, {
         'url': 'https://egghead.io/api/v1/lessons/react-add-redux-to-a-react-application',
         'only_matching': True,
+    }, {
+        'url': 'https://app.egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):


Test patch: