Fixed the bug that causes tagging all the posts' types as null in single post

This commit is contained in:
Ali Parlakci
2018-07-10 00:38:27 +03:00
parent 788a2c72e8
commit e3a97cc495

View File

@@ -324,16 +324,15 @@ def redditSearcher(posts,SINGLE_POST=False):
except AttributeError: except AttributeError:
pass pass
postsFile.add({subCount:[details]}) result = checkIfMatching(submission)
details = checkIfMatching(submission)
if details is not None: if result is not None:
if not details["postType"] == "self": details = result
orderCount += 1 orderCount += 1
printSubmission(submission,subCount,orderCount) printSubmission(submission,subCount,orderCount)
subList.append(details) subList.append(details)
else:
postsFile.add({subCount:[details]}) postsFile.add({subCount:[details]})
else: else:
for submission in posts: for submission in posts: