From 48e42e73fb72ca3d2f9fb45dd3f3141684be9268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 20 Dec 2019 16:54:59 +0100 Subject: [PATCH] [reddit] change default value for 'comments' to '0' --- docs/configuration.rst | 2 +- docs/gallery-dl.conf | 2 +- gallery_dl/extractor/reddit.py | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 078c761b..365bdd05 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -886,7 +886,7 @@ extractor.reddit.comments ------------------------- =========== ===== Type ``integer`` -Default ``500`` +Default ``0`` Description The value of the ``limit`` parameter when loading a submission and its comments. This number (roughly) specifies the total amount of comments diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index 2a25b1d3..69d1e036 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -110,7 +110,7 @@ "reddit": { "refresh-token": null, - "comments": 500, + "comments": 0, "morecomments": false, "date-min": 0, "date-max": 253402210800, diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index a9c709ca..656148e5 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -132,15 +132,14 @@ class RedditSubmissionExtractor(RedditExtractor): r")/([a-z0-9]+)") test = ( ("https://www.reddit.com/r/lavaporn/comments/8cqhub/", { - "pattern": r"https://", - "count": 3, - }), - # ignore submission comments (#429) - ("https://www.reddit.com/r/lavaporn/comments/8cqhub/", { - "options": (("comments", 0),), "pattern": r"https://c2.staticflickr.com/8/7272/\w+_k.jpg", "count": 1, }), + ("https://www.reddit.com/r/lavaporn/comments/8cqhub/", { + "options": (("comments", 500),), + "pattern": r"https://", + "count": 3, + }), ("https://old.reddit.com/r/lavaporn/comments/2a00np/"), ("https://np.reddit.com/r/lavaporn/comments/2a00np/"), ("https://m.reddit.com/r/lavaporn/comments/2a00np/"), @@ -188,7 +187,7 @@ class RedditAPI(): def __init__(self, extractor): self.extractor = extractor - self.comments = text.parse_int(extractor.config("comments", 500)) + self.comments = text.parse_int(extractor.config("comments", 0)) self.morecomments = extractor.config("morecomments", False) self.refresh_token = extractor.config("refresh-token") self.log = extractor.log