From 84e0e33a19ce3206b0e17bf9bd0c25811a0b20c2 Mon Sep 17 00:00:00 2001 From: George Schizas Date: Fri, 6 Jan 2023 21:27:02 +0200 Subject: [PATCH] [extractor/reddit] Add subreddit as `channel_id` (#5685) Authored by: gschizas Closes #5684 --- yt_dlp/extractor/reddit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.py index fcfee51e8..836b3a7ae 100644 --- 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 @@ -165,6 +167,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')),