Temporary fix.
This commit is contained in:
@@ -19,7 +19,6 @@ from .__version__ import __version__
|
||||
|
||||
__all__ = []
|
||||
|
||||
|
||||
def load_config():
|
||||
"""
|
||||
Search for a configuration file at the location ~/.rtv and attempt to load
|
||||
@@ -100,6 +99,7 @@ def main():
|
||||
|
||||
if args.log:
|
||||
logging.basicConfig(level=logging.DEBUG, filename=args.log)
|
||||
logging.captureWarnings(True)
|
||||
|
||||
try:
|
||||
print('Connecting...')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import textwrap
|
||||
import logging
|
||||
|
||||
import praw
|
||||
import requests
|
||||
@@ -8,6 +9,7 @@ from .helpers import humanize_timestamp, wrap_text, strip_subreddit_url
|
||||
|
||||
__all__ = ['SubredditContent', 'SubmissionContent']
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class BaseContent(object):
|
||||
|
||||
@@ -41,9 +43,9 @@ class BaseContent(object):
|
||||
retval = []
|
||||
while stack:
|
||||
item = stack.pop(0)
|
||||
if isinstance(item, praw.objects.MoreComments) and (
|
||||
item.count == 0):
|
||||
continue
|
||||
if not isinstance(item, praw.objects.MoreComments):
|
||||
if item._replies is None:
|
||||
item._replies = [stack.pop(0)]
|
||||
nested = getattr(item, 'replies', None)
|
||||
if nested:
|
||||
for n in nested:
|
||||
@@ -210,7 +212,7 @@ class SubmissionContent(BaseContent):
|
||||
|
||||
elif data['type'] == 'MoreComments':
|
||||
with self._loader():
|
||||
comments = data['object'].comments(update=False)
|
||||
comments = data['object'].comments(update=True)
|
||||
comments = self.flatten_comments(comments,
|
||||
root_level=data['level'])
|
||||
comment_data = [self.strip_praw_comment(c) for c in comments]
|
||||
|
||||
Reference in New Issue
Block a user