aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Schizas <gschizas@gmail.com>2023-01-06 21:27:02 +0200
committerGitHub <noreply@github.com>2023-01-07 00:57:02 +0530
commit84e0e33a19ce3206b0e17bf9bd0c25811a0b20c2 (patch)
treef116474f028bdcdf01203d3347f04e1e4ce266a8
parentab4cbeff00ac08f142f78a6281aa0c1124a59daa (diff)
downloadhypervideo-pre-84e0e33a19ce3206b0e17bf9bd0c25811a0b20c2.tar.lz
hypervideo-pre-84e0e33a19ce3206b0e17bf9bd0c25811a0b20c2.tar.xz
hypervideo-pre-84e0e33a19ce3206b0e17bf9bd0c25811a0b20c2.zip
[extractor/reddit] Add subreddit as `channel_id` (#5685)
Authored by: gschizas Closes #5684
-rw-r--r--yt_dlp/extractor/reddit.py3
1 files changed, 3 insertions, 0 deletions
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 @@ class RedditIE(InfoExtractor):
'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')),