REQUEST changing the name of the output file
how would i go and change the name of the output file to match the title of the reddit post

i see the script already knows what the post title is, so i have to imagine its not to hard to take that and assign it to the output file?
I have created an edit that will make the final video's name the Reddit thread title. You can try it out on my fork: https://github.com/reoccurcat/RedditVideoMakerBot/tree/final_video_name_test There's probably enough demand that I could get a PR started to merge this into master to be honest.
ok so i think i got it working by replacing
final.write_videofile(
f"assets/Final_Video.mp4", fps=30, audio_codec="aac", audio_bitrate="192k"
)
with
reddit = praw.Reddit(
client_id=os.getenv("REDDIT_CLIENT_ID"),
client_secret=os.getenv("REDDIT_CLIENT_SECRET"),
user_agent="Accessing AskReddit threads",
username=os.getenv("REDDIT_USERNAME"),
password=os.getenv("REDDIT_PASSWORD"),
)
askreddit = reddit.subreddit(os.getenv("REDDIT_SUBREDDIT"))
threads = askreddit.hot(limit=25)
submission = list(threads)[random.randrange(0, 25)]
final.write_videofile(
f"assets/{submission}.mp4", fps=30, audio_codec="aac", audio_bitrate="192k"
)
and adding
import praw
import os
import random
to the top of Video_creation\Final_video.py
but now i get an error that i think i know what needs to be done to fix, but im not sure how to do it. i know Windows doesnt like having "?' and some other symbols in its file name,s so how would i go about striping those symbols from the title name?
I have created an edit that will make the final video's name the Reddit thread title. You can try it out on my fork: https://github.com/reoccurcat/RedditVideoMakerBot/tree/final_video_name_test There's probably enough demand that I could get a PR started to merge this into master to be honest.
i will take a look, was i on the right track by chance? im new to python and im taking the "cut and paste" approach and just moving parts of the code that work to other parts that i want to work
i will take a look, was i on the right track by chance?
Yeah, you just took a little bit more complicated way of doing it, instead of just returning the name from the function that gets the subreddit.
I'm going to push another commit pretty soon that will fix a lot more of the windows path issues with the characters though, because so far mine just strips off the question mark that's usually at the end
yea i figured there was an easier way to do it, i just didnt know how
I just pushed a commit that sanitizes the filename a bit better.
ok cool, how do i download a commit?
Try using this url. Disclaimer: this has some of my changes I've put into a pull request just recently (#171)

getting error?
You probably haven't installed yt-dlp yet, run pip install yt-dlp
It got introduced in a new commit recently
can i message you on discord to query you for a few tings?
Yup, reoccurcat#0001, go ahead and shoot me a friend request
wooo all the issues coming back :D lol
Make sure your .env is formatted like this:
REDDIT_CLIENT_ID=""
REDDIT_CLIENT_SECRET=""
REDDIT_USERNAME=""
REDDIT_PASSWORD=""
# Valid options are "yes" and "no" for the variable below
REDDIT_2FA=""
SUBREDDIT=""
i've sovled this in a faster way with #139
Now in main branch, this issue can be closed @CallumIO @reinkdesigns