Repository: yt-dlp/yt-dlp

Issue:
Add subreddit name (as channel) in the data from info extraction
### 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 requesting a site-specific feature
- [X] I've verified that I'm running yt-dlp version **2022.11.11** ([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 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

_No response_

### Example URLs

https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/

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

When downloading a video from reddit, the subreddit name comes useful, and it's easy to extract from the original data. The proposal is to add the subreddit name to the extracted info as "channel" (for compatibility with other extractors).

Right now, with the `test:reddit` URL, the channel is (obviously) 'NA'. With this proposal, the channel should be 'videos' (from [r/videos](https://www.reddit.com/r/videos).

### 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
[debug] Command-line config: ['-vU', 'test:reddit', '-o', '%(channel)s-%(id)s.%(ext)s']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (zip)
[debug] Python 3.10.6 (CPython x86_64 64bit) - Linux-5.15.0-53-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: certifi-2022.09.24, secretstorage-3.3.3, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [TestURL] Extracting URL: test:reddit
[TestURL] Test URL: https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
[debug] [Reddit] Extracting URL: https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
[Reddit] 6rrwyj: Downloading JSON metadata
[Reddit] 6rrwyj: Downloading m3u8 information
[Reddit] 6rrwyj: Downloading MPD manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] zv89llsvexdz: Downloading 1 format(s): hls-1875+dash-AUDIO-1
[debug] Invoking hlsnative downloader on "https://v.redd.it/zv89llsvexdz/HLS_1_5_M_v4.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 5
[download] Destination: NA-zv89llsvexdz.fhls-1875.mp4
[download] 100% of    2.23MiB in 00:00:02 at 1.07MiB/s
[debug] Invoking http downloader on "https://v.redd.it/zv89llsvexdz/audio"
[download] Destination: NA-zv89llsvexdz.fdash-AUDIO-1.m4a
[download] 100% of  189.47KiB in 00:00:00 at 776.30KiB/s
[Merger] Merging formats into "NA-zv89llsvexdz.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i file:NA-zv89llsvexdz.fhls-1875.mp4 -i file:NA-zv89llsvexdz.fdash-AUDIO-1.m4a -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart file:NA-zv89llsvexdz.temp.mp4
Deleting original file NA-zv89llsvexdz.fhls-1875.mp4 (pass -k to keep)
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.py
--- a/yt_dlp/extractor/reddit.py
+++ b/yt_dlp/extractor/reddit.py
@@ -32,6 +32,7 @@ class RedditIE(InfoExtractor):
             'dislike_count': int,
             'comment_count': int,
             'age_limit': 0,
+            'channel_id': 'videos',
         },
         'params': {
             'skip_download': True,
@@ -55,6 +56,7 @@ class RedditIE(InfoExtractor):
             'dislike_count': int,
             'comment_count': int,
             'age_limit': 0,
+            'channel_id': 'aww',
         },
     }, {
         # videos embedded in reddit text post
@@ -146,6 +148,7 @@ def add_thumbnail(src):
             'thumbnails': thumbnails,
             'timestamp': float_or_none(data.get('created_utc')),
             'uploader': data.get('author'),
+            'channel_id': data.get('subreddit'),
             'like_count': int_or_none(data.get('ups')),
             'dislike_count': int_or_none(data.get('downs')),
             'comment_count': int_or_none(data.get('num_comments')),


Test patch: