dazeb / YouTubeAutomation-Reddit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YouTubeAutomation-Reddit πŸŽ₯

Using this project, videos generated from Reddit posts will be automatically uploaded to your YouTube channel

"Buy Me A Coffee"

Sample Video

video.mp4

Built With

  • AWS
  • Python
  • Reddit
  • Youtube
  • Json

Installation πŸ‘¨β€πŸ’»

  1. Clone this repository

  2. Run pip install -r requirements.txt

  3. Run python -m playwright install and python -m playwright install-deps

  4. Go to Free Cloud Computing Services - AWS Free Tier

    • Sing in to the console

    1

    • Click on Open account menu
    • Click on Security credentials

    2

    • Click on Create access key

    3

    • 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'
  5. Go to Reddit App Preferences and click on create another app at the bottom.

    • Fill out the required details, make sure to select script and click on create app.

    4

    • Make a note of the personal use script & secret token and update the the following credentials in the config.toml file.

    5

     [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'
  6. 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:

  7. 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
  1. 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!

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%