[reddit] fix documentation inconsistencies (closes #429)

- Require 'reddit.comments' to be a number and convert it to an
  integer to be extra sure
- Link to the README's OAuth section were appropriate
This commit is contained in:
Mike Fährmann
2019-09-27 17:34:10 +02:00
parent 20eb6c401f
commit 46ba173ded
2 changed files with 10 additions and 9 deletions

View File

@@ -179,7 +179,7 @@ class RedditAPI():
def __init__(self, extractor):
self.extractor = extractor
self.comments = extractor.config("comments", 500)
self.comments = text.parse_int(extractor.config("comments", 500))
self.morecomments = extractor.config("morecomments", False)
self.refresh_token = extractor.config("refresh-token")
self.log = extractor.log
@@ -191,7 +191,7 @@ class RedditAPI():
self.client_id = None
self.log.warning(
"Conflicting values for 'client-id' and 'user-agent': "
"override either both or none of them.")
"overwrite either both or none of them.")
else:
self.client_id = client_id
extractor.session.headers["User-Agent"] = user_agent