added a potential bypass in case of absolute mad lads

pull/998/head
Jason 3 years ago
parent 7ef9bb2747
commit 839eb6fc2f

@ -5,7 +5,7 @@ from utils import settings
from utils.console import print_substep
def get_subreddit_undone(submissions: list, subreddit):
def get_subreddit_undone(submissions: list, subreddit, times_checked=0):
"""_summary_
Args:
@ -41,9 +41,13 @@ def get_subreddit_undone(submissions: list, subreddit):
continue
return submission
print("all submissions have been done going by top submission order")
VALID_TIME_FILTERS = ["day", "hour", "month", "week", "year", 'all'] # set doesn't have __getitem__
index = times_checked + 1
if index == len(VALID_TIME_FILTERS):
print("all time filters have been checked you absolute madlad ")
return get_subreddit_undone(
subreddit.top(time_filter="hour"), subreddit
) # all the videos in hot have already been done
subreddit.top(time_filter=VALID_TIME_FILTERS[index], limit=(50 if int(index) == 0 else index+1 * 50)), subreddit, times_checked=index) # all the videos in hot have already been done
def already_done(done_videos: list, submission) -> bool:

Loading…
Cancel
Save