Skip to content

Instantly share code, notes, and snippets.

@Miserlou
Created November 7, 2017 19:37
Show Gist options
  • Save Miserlou/65928bbd05b79f8a34e456e3db6739dd to your computer and use it in GitHub Desktop.
Save Miserlou/65928bbd05b79f8a34e456e3db6739dd to your computer and use it in GitHub Desktop.
uploader
print("Starting upload..")
title = s_title + ' - by u/' + submission.author.name + " to " + submission.subreddit.url
description = "Originally posted to " + submission.url + ". This video is uploaded by a bot for the convenience of mobile reddit users. Sorry about your copyright."
output = subprocess.check_output([ "/usr/bin/python2.7",
"youtube-upload/bin/youtube-upload",
outfile,
"--title",
title,
"--client-secrets",
"client_secrets.json",
"--credentials-file",
"yt-u-c.json",
"--description",
description],
env={'PYTHONPATH': '/var/task'}
)
video_id = output.strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment