[reddit] change default value for 'comments' to '0'
This commit is contained in:
@@ -886,7 +886,7 @@ extractor.reddit.comments
|
|||||||
-------------------------
|
-------------------------
|
||||||
=========== =====
|
=========== =====
|
||||||
Type ``integer``
|
Type ``integer``
|
||||||
Default ``500``
|
Default ``0``
|
||||||
Description The value of the ``limit`` parameter when loading
|
Description The value of the ``limit`` parameter when loading
|
||||||
a submission and its comments.
|
a submission and its comments.
|
||||||
This number (roughly) specifies the total amount of comments
|
This number (roughly) specifies the total amount of comments
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
"reddit":
|
"reddit":
|
||||||
{
|
{
|
||||||
"refresh-token": null,
|
"refresh-token": null,
|
||||||
"comments": 500,
|
"comments": 0,
|
||||||
"morecomments": false,
|
"morecomments": false,
|
||||||
"date-min": 0,
|
"date-min": 0,
|
||||||
"date-max": 253402210800,
|
"date-max": 253402210800,
|
||||||
|
|||||||
@@ -132,15 +132,14 @@ class RedditSubmissionExtractor(RedditExtractor):
|
|||||||
r")/([a-z0-9]+)")
|
r")/([a-z0-9]+)")
|
||||||
test = (
|
test = (
|
||||||
("https://www.reddit.com/r/lavaporn/comments/8cqhub/", {
|
("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",
|
"pattern": r"https://c2.staticflickr.com/8/7272/\w+_k.jpg",
|
||||||
"count": 1,
|
"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://old.reddit.com/r/lavaporn/comments/2a00np/"),
|
||||||
("https://np.reddit.com/r/lavaporn/comments/2a00np/"),
|
("https://np.reddit.com/r/lavaporn/comments/2a00np/"),
|
||||||
("https://m.reddit.com/r/lavaporn/comments/2a00np/"),
|
("https://m.reddit.com/r/lavaporn/comments/2a00np/"),
|
||||||
@@ -188,7 +187,7 @@ class RedditAPI():
|
|||||||
|
|
||||||
def __init__(self, extractor):
|
def __init__(self, extractor):
|
||||||
self.extractor = 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.morecomments = extractor.config("morecomments", False)
|
||||||
self.refresh_token = extractor.config("refresh-token")
|
self.refresh_token = extractor.config("refresh-token")
|
||||||
self.log = extractor.log
|
self.log = extractor.log
|
||||||
|
|||||||
Reference in New Issue
Block a user