Repository: yt-dlp/yt-dlp

Issue:
Cook's Country 
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.10.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

USA

### Provide a description that is worded well enough to be understood

Not grabbing video anymore, updated the cookies.  Paid subscription.  User name and password available, if required.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
D:\My Video\yt_dlp>yt-dlp.exe -Uv --cookies cookscountry.com_cookies.txt https://www.americastestkitchen.com/cookscountry/episode/836-pennsylvanian-melting-pot
[debug] Command-line config: ['-Uv', '--cookies', 'cookscountry.com_cookies.txt', 'https://www.americastestkitchen.com/cookscountry/episode/836-pennsylvanian-melting-pot']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 2022-10-10-git-f3b5277057-full_build-www.gyan.dev (setts), ffprobe 2022-10-10-git-f3b5277057-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [generic] Extracting URL: https://www.americastestkitchen.com/cookscountry/episode/836-pennsylvanian-melting-pot
[generic] 836-pennsylvanian-melting-pot: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] 836-pennsylvanian-melting-pot: Extracting information
[debug] Looking for Brightcove embeds
[debug] Looking for embeds
[debug] Identified a JSON LD
[debug] [generic] Extracting URL: http://www.americastestkitchen.com/cookscountry/episode/836-pennsylvanian-melting-pot#__youtubedl_smuggle=%7B%22force_videoid%22%3A+%22836-pennsylvanian-melting-pot%22%2C+%22to_generic%22%3A+true%2C+%22http_headers%22%3A+%7B%22Referer%22%3A+%22https%3A%2F%2Fwww.americastestkitchen.com%2Fcookscountry%2Fepisode%2F836-pennsylvanian-melting-pot%22%7D%7D
```



Discussion:
Cook's Country episodes now download from
`http://www.americastestkitchen.com/cookscountry/episode/`
instead of
`http://www.cookscountry.com/episode/`

Resolving patch:
diff --git a/yt_dlp/extractor/americastestkitchen.py b/yt_dlp/extractor/americastestkitchen.py
--- a/yt_dlp/extractor/americastestkitchen.py
+++ b/yt_dlp/extractor/americastestkitchen.py
@@ -11,7 +11,7 @@
 
 
 class AmericasTestKitchenIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?(?:americastestkitchen|cooks(?:country|illustrated))\.com/(?P<resource_type>episode|videos)/(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:www\.)?americastestkitchen\.com/(?:cooks(?:country|illustrated)/)?(?P<resource_type>episode|videos)/(?P<id>\d+)'
     _TESTS = [{
         'url': 'https://www.americastestkitchen.com/episode/582-weeknight-japanese-suppers',
         'md5': 'b861c3e365ac38ad319cfd509c30577f',
@@ -19,15 +19,20 @@ class AmericasTestKitchenIE(InfoExtractor):
             'id': '5b400b9ee338f922cb06450c',
             'title': 'Japanese Suppers',
             'ext': 'mp4',
+            'display_id': 'weeknight-japanese-suppers',
             'description': 'md5:64e606bfee910627efc4b5f050de92b3',
-            'thumbnail': r're:^https?://',
-            'timestamp': 1523318400,
-            'upload_date': '20180410',
-            'release_date': '20180410',
-            'series': "America's Test Kitchen",
-            'season_number': 18,
+            'timestamp': 1523304000,
+            'upload_date': '20180409',
+            'release_date': '20180409',
+            'series': 'America\'s Test Kitchen',
+            'season': 'Season 18',
             'episode': 'Japanese Suppers',
+            'season_number': 18,
             'episode_number': 15,
+            'duration': 1376,
+            'thumbnail': r're:^https?://',
+            'average_rating': 0,
+            'view_count': int,
         },
         'params': {
             'skip_download': True,
@@ -40,15 +45,20 @@ class AmericasTestKitchenIE(InfoExtractor):
             'id': '5fbe8c61bda2010001c6763b',
             'title': 'Simple Chicken Dinner',
             'ext': 'mp4',
+            'display_id': 'atktv_2103_simple-chicken-dinner_full-episode_web-mp4',
             'description': 'md5:eb68737cc2fd4c26ca7db30139d109e7',
-            'thumbnail': r're:^https?://',
-            'timestamp': 1610755200,
-            'upload_date': '20210116',
-            'release_date': '20210116',
-            'series': "America's Test Kitchen",
-            'season_number': 21,
+            'timestamp': 1610737200,
+            'upload_date': '20210115',
+            'release_date': '20210115',
+            'series': 'America\'s Test Kitchen',
+            'season': 'Season 21',
             'episode': 'Simple Chicken Dinner',
+            'season_number': 21,
             'episode_number': 3,
+            'duration': 1397,
+            'thumbnail': r're:^https?://',
+            'view_count': int,
+            'average_rating': 0,
         },
         'params': {
             'skip_download': True,
@@ -57,10 +67,10 @@ class AmericasTestKitchenIE(InfoExtractor):
         'url': 'https://www.americastestkitchen.com/videos/3420-pan-seared-salmon',
         'only_matching': True,
     }, {
-        'url': 'https://www.cookscountry.com/episode/564-when-only-chocolate-will-do',
+        'url': 'https://www.americastestkitchen.com/cookscountry/episode/564-when-only-chocolate-will-do',
         'only_matching': True,
     }, {
-        'url': 'https://www.cooksillustrated.com/videos/4478-beef-wellington',
+        'url': 'https://www.americastestkitchen.com/cooksillustrated/videos/4478-beef-wellington',
         'only_matching': True,
     }]
 
@@ -90,7 +100,7 @@ def _real_extract(self, url):
 
 
 class AmericasTestKitchenSeasonIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?(?P<show>americastestkitchen|cookscountry)\.com/episodes/browse/season_(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:www\.)?americastestkitchen\.com(?P<show>/cookscountry)?/episodes/browse/season_(?P<id>\d+)'
     _TESTS = [{
         # ATK Season
         'url': 'https://www.americastestkitchen.com/episodes/browse/season_1',
@@ -101,7 +111,7 @@ class AmericasTestKitchenSeasonIE(InfoExtractor):
         'playlist_count': 13,
     }, {
         # Cooks Country Season
-        'url': 'https://www.cookscountry.com/episodes/browse/season_12',
+        'url': 'https://www.americastestkitchen.com/cookscountry/episodes/browse/season_12',
         'info_dict': {
             'id': 'season_12',
             'title': 'Season 12',
@@ -110,17 +120,17 @@ class AmericasTestKitchenSeasonIE(InfoExtractor):
     }]
 
     def _real_extract(self, url):
-        show_name, season_number = self._match_valid_url(url).groups()
+        show_path, season_number = self._match_valid_url(url).group('show', 'id')
         season_number = int(season_number)
 
-        slug = 'atk' if show_name == 'americastestkitchen' else 'cco'
+        slug = 'cco' if show_path == '/cookscountry' else 'atk'
 
         season = 'Season %d' % season_number
 
         season_search = self._download_json(
             'https://y1fnzxui30-dsn.algolia.net/1/indexes/everest_search_%s_season_desc_production' % slug,
             season, headers={
-                'Origin': 'https://www.%s.com' % show_name,
+                'Origin': 'https://www.americastestkitchen.com',
                 'X-Algolia-API-Key': '8d504d0099ed27c1b73708d22871d805',
                 'X-Algolia-Application-Id': 'Y1FNZXUI30',
             }, query={
@@ -136,12 +146,12 @@ def _real_extract(self, url):
 
         def entries():
             for episode in (season_search.get('hits') or []):
-                search_url = episode.get('search_url')
+                search_url = episode.get('search_url')  # always formatted like '/episode/123-title-of-episode'
                 if not search_url:
                     continue
                 yield {
                     '_type': 'url',
-                    'url': 'https://www.%s.com%s' % (show_name, search_url),
+                    'url': f'https://www.americastestkitchen.com{show_path or ""}{search_url}',
                     'id': try_get(episode, lambda e: e['objectID'].split('_')[-1]),
                     'title': episode.get('title'),
                     'description': episode.get('description'),


Test patch: