Using this project, videos generated from Reddit posts will be automatically uploaded to your YouTube channel
Clone this repository
Run pip install -r requirements.txt
Run python -m playwright install and python -m playwright install-deps
Go to Free Cloud Computing Services - AWS Free Tier
Once you created the access key and obtained the secret key, open the config.toml
file in the project and update the following parameters accordingly.
[AmazonAWSCredential]
aws_access_key_id = 'YOUR AWS ACCESS KEY ID'
aws_secret_access_key = 'YOUR AWS SECRET ACCESS KEY'
Go to Reddit App Preferences and click on create another app at the bottom.
config.toml
file. [RedditCredential]
client_id='YOUR PERSONAL USE SCRIPT'
client_secret='YOUR SECRET TOKEN'
user_agent='{YOUR REDDIT PROJECT NAME} v4.0 by /u/{YOUR REDDIT USERNAME}'
username='YOUR REDDIT USERNAME'
passkey='YOUR REDDIT PASSWORD'
At this point you can run the the program and generate a video however before that you need to updating a few more parameter in the config.toml
file.
[Directory]
# absolute path to where this project is cloned or downloaded e.g: Desktop/YoutubeAutomation-Reddit
path=''
# --------------------------------------------
[Background]
# absolute path to the background video e.g: Desktop/minecraft.mp4
path=''
You can download any YouTube video as a background and add its path to the config.toml
file. Here are a few options:
If you want the app to automatically upload the generated video into your Youtube channel, first set upload_to_youtube = true
and specify how often you want the app to upload a video (in seconds). I don't recommond anything less than every 6 hours because you will reach your qouta limit.
[App]
# whether the result video should be uploaded to your youtube channel
upload_to_youtube=false
# how often should the app be run (in seconds) e.g: every 6 hours -> 21600 seconds
run_every=21600
Finally you need to enable the Youtube api to be able to upload videos from your computer. This process is a bit more involved, so I'll link to a blog tutorial. Just follow the steps until minute 10:58 and you will be able to get a client_id
and a client_secret
. Update the following parameters and HOORAY!
[YoutubeCredential]
client_id=''
client_secret=''
All we are left do is run
python main.py
And let the app do the the rest!