RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Allow the selection of a random Subreddit thread within the Hot list, rather than incremending through it from top to bottom.

Open ParkerDaudt opened this issue 3 years ago • 4 comments

Is your feature request related to a problem? Please describe. I found it a bit annoying that the program would incrementally go through a subreddit's hot list to grab a thread.

Describe the solution you'd like I thought it would be nice to randomly select a thread from the Hot list.

Additional context (optional) I modified the subreddit.py file to include a random number generator and select the subreddit thread randomly each time the program is run. It's also important to import the random function at the beginning of the file.

Modified subreddit.py excerpt

else: threads = subreddit.hot(limit=100) submissionarray = [] for submission in threads: submissionarray.append(submission) if len(submissionarray) > 0: x = random.randrange(0, len(submissionarray), 2) submission = submissionarray[x] submission = check_done(submission) # double-checking

ParkerDaudt avatar Jul 15 '22 19:07 ParkerDaudt

Not exactly sure how to make a pull request.

ParkerDaudt avatar Jul 15 '22 19:07 ParkerDaudt

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

mikhi32 avatar Jul 16 '22 09:07 mikhi32

I like the implementation

mikhi32 avatar Jul 16 '22 09:07 mikhi32

Implementation is fine You just have to handle logic for getting the same post over again

JasonLovesDoggo avatar Jul 16 '22 12:07 JasonLovesDoggo