Repository: yt-dlp/yt-dlp

Issue:
Add support for episode thumbnails for fox.com and cwtv.com
### Checklist

- [X] I'm reporting a feature request
- [X] I've verified that I'm running yt-dlp version **2021.11.10.1**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [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)

### Description

Here is a patch that adds thumbnail metadata of fox.com and cwtv.com for the --write-thumbnail option

Note that the both sites have multiple thumbnails in their json, that could be used for a more complete representation

```
diff -Naur extractor_orig/cwtv.py extractor/cwtv.py
--- extractor_orig/cwtv.py      2021-11-15 10:39:18.400997497 -0600
+++ extractor/cwtv.py   2021-11-15 10:35:39.672929730 -0600
@@ -91,6 +91,7 @@
             'series': video_data.get('series_name'),
             'season_number': int_or_none(season),
             'episode_number': int_or_none(episode),
+            'thumbnail': video_data.get('thumbnail'),
             'timestamp': parse_iso8601(video_data.get('start_time')),
             'age_limit': parse_age_limit(video_data.get('rating')),
             'ie_key': 'ThePlatform',
diff -Naur extractor_orig/fox.py extractor/fox.py
--- extractor_orig/fox.py       2021-11-15 10:39:18.430997230 -0600
+++ extractor/fox.py    2021-11-15 10:35:46.872866686 -0600
@@ -145,6 +145,7 @@
             'season_number': int_or_none(video.get('seasonNumber')),
             'episode': video.get('name'),
             'episode_number': int_or_none(video.get('episodeNumber')),
+            'thumbnail':  video.get('images').get('still').get('raw'),
             'release_year': int_or_none(video.get('releaseYear')),
             'subtitles': subtitles,
         }

```


Discussion:
If possible, please add test and submit a PR
I'm not sure how to do that.  I didn't do a pull or push request.  I was just editing what pip installed.

Resolving patch:
diff --git a/yt_dlp/extractor/fox.py b/yt_dlp/extractor/fox.py
--- a/yt_dlp/extractor/fox.py
+++ b/yt_dlp/extractor/fox.py
@@ -12,8 +12,10 @@
     int_or_none,
     parse_age_limit,
     parse_duration,
+    traverse_obj,
     try_get,
     unified_timestamp,
+    url_or_none,
 )
 
 
@@ -34,7 +36,8 @@ class FOXIE(InfoExtractor):
             'creator': 'FOX',
             'series': 'Gotham',
             'age_limit': 14,
-            'episode': 'Aftermath: Bruce Wayne Develops Into The Dark Knight'
+            'episode': 'Aftermath: Bruce Wayne Develops Into The Dark Knight',
+            'thumbnail': r're:^https?://.*\.jpg$',
         },
         'params': {
             'skip_download': True,
@@ -165,6 +168,7 @@ def _real_extract(self, url):
             'season_number': int_or_none(video.get('seasonNumber')),
             'episode': video.get('name'),
             'episode_number': int_or_none(video.get('episodeNumber')),
+            'thumbnail': traverse_obj(video, ('images', 'still', 'raw'), expected_type=url_or_none),
             'release_year': int_or_none(video.get('releaseYear')),
             'subtitles': subtitles,
         }


Test patch: