diff options
| author | 2024-10-25 17:27:30 -0400 | |
|---|---|---|
| committer | 2024-10-25 17:27:30 -0400 | |
| commit | fc004701f923bb954a22c7fec2ae8d607e78cb2b (patch) | |
| tree | a5bea4ed6447ea43c099131430e3bd6182ee87d7 /gallery_dl/extractor/reddit.py | |
| parent | 0db541f524e1774865efebcbe5653e9ad76ea2e8 (diff) | |
New upstream version 1.27.7.upstream/1.27.7
Diffstat (limited to 'gallery_dl/extractor/reddit.py')
| -rw-r--r-- | gallery_dl/extractor/reddit.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index ce602f6..8577e74 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -31,6 +31,7 @@ class RedditExtractor(Extractor): parentdir = self.config("parent-directory") max_depth = self.config("recursion", 0) previews = self.config("previews", True) + embeds = self.config("embeds", True) videos = self.config("videos", True) if videos: @@ -100,7 +101,7 @@ class RedditExtractor(Extractor): for comment in comments: html = comment["body_html"] or "" href = (' href="' in html) - media = ("media_metadata" in comment) + media = (embeds and "media_metadata" in comment) if media or href: comment["date"] = text.parse_timestamp( @@ -211,8 +212,9 @@ class RedditExtractor(Extractor): def _extract_video_dash(self, submission): submission["_ytdl_extra"] = {"title": submission["title"]} try: - return (submission["secure_media"]["reddit_video"]["dash_url"] + - "#__youtubedl_smuggle=%7B%22to_generic%22%3A+1%7D") + url = submission["secure_media"]["reddit_video"]["dash_url"] + submission["_ytdl_manifest"] = "dash" + return url except Exception: return submission["url"] |
