Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 5844377

Browse files
author
PokestarFan
committed
removed un-needed stuff
1 parent 7a4f9e7 commit 5844377

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

Diff for: lowpostremover.py

+1-35
Original file line numberDiff line numberDiff line change
@@ -27,46 +27,12 @@
2727

2828
#defining the searching and removal
2929
def action():
30-
global comment_submissions #making glocal comment submission title list
31-
comment_submissions = []
32-
submission_titles = []
33-
submission_number = 0
34-
comment_number = 0
35-
current_submission_number = 0
36-
current_comment_number = 0
3730
logging.info('Searching...')
3831
user = r.user.me()
3932
for comment in r.redditor(str(user)).comments.new(limit=None): #scanning all comments by reddit user without limit
4033
logging.debug('On comment {}'.format(str(comment)))
4134
if comment.score < setvalue: #if statement checking the comment score < 0
4235
comment.delete() #deleteing the comment if < 0
4336
logging.info('Removed comment {}'.format(str(comment)))
44-
comment_submissions.append(comment.submission.title) #adding the comment's original submission title to the list
45-
46-
#defining the outputs
47-
def print_results():
48-
logging.info('Search Complete')
49-
logging.info('--------------------------------------------------')
50-
#if statement. True if there is 1 or more comments removed.
51-
if len(comment_submissions) > 0:
52-
#logging.infoing true results
53-
logging.info('Removed ' + str(len(comment_submissions)) + ' comment(s).')
54-
logging.info('Comments were under the following submissions: ')
55-
logging.info(*comment_submissions, sep='\n') #logging.infoing comment's submission's titles with line breaks
56-
logging.info('--------------------------------------------------')
57-
else:
58-
#logging.infoing false results
59-
logging.info('No comments removed.')
60-
logging.info('--------------------------------------------------')
61-
62-
###########################
63-
# code execution
64-
###########################
65-
66-
67-
def main():
68-
action()
69-
print_results()
7037

71-
while True:
72-
main()
38+
action()

0 commit comments

Comments
 (0)