1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[reddit] change default value for 'comments' to '0'

This commit is contained in:
Mike Fährmann 2019-12-20 16:54:59 +01:00
parent 9c0928457a
commit 48e42e73fb
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 8 additions and 9 deletions

View File

@ -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

View File

@ -110,7 +110,7 @@
"reddit":
{
"refresh-token": null,
"comments": 500,
"comments": 0,
"morecomments": false,
"date-min": 0,
"date-max": 253402210800,

View File

@ -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