Automating My YouTube Uploads Using Node.js
Вставка
- Опубліковано 28 чер 2024
- In this video, you will learn how I automated my UA-cam uploads using Node.js. I've used the UA-cam API through Google's readily available Node.js client library. The library handles all HTTP communication with UA-cam API's upload endpoint. I extract all the required fields for the video (title, description, tags, etc.) from my video's script file and upload them to UA-cam along with the video and the thumbnail. As always, I will start the project with a design document and will write tests. Also, I will do a live demonstration of the uploader module in action. In fact, I uploaded this video to UA-cam using the uploader module that I've created in this video!
Outline of this video:
* 0:00 - Superfast demo
* 0:25 - Overview
* 1:00 - Project Design Document
* 4:05 - Video Upload Automation Demo With UA-cam API and Node.js
* 8:01 - Upload Demo
* 9:33 - Next Steps
You can find my UA-cam uploader code at:
* quanticdev.com/articles/autom...
* gist.github.com/soygul/426774...
UA-cam API Resources:
* Node.js Client QuickStart Guide. My uploader code is adapted from this. Follow the first section of it to download your project credentials: developers.google.com/youtube...
* API Reference: developers.google.com/youtube...
* API Credentials: console.developers.google.com...
If you don't already have a verified UA-cam project, or an old Google APIs project, you will have to ask your project to be whitelisted or your uploads cannot be made public:
* UA-cam API Compliance Audit Request Form: support.google.com/youtube/co...
My Software Engineering Playlist:
* • Software Engineering
- - - - - - - - - - -
/ quanticdev
/ quantic_dev
quanticdev.com - Наука та технологія
If you don't already have a verified UA-cam project, or an old Google APIs project, you will have to ask your project to be whitelisted or your uploads cannot be made public: "UA-cam API Compliance Audit Request Form": support.google.com/youtube/contact/yt_api_form
Stackoverflow says they never approve private/hobbyist projects, Google is focused only on businesses. I submitted the form but have zero hopes. :cry
@@EnglishRain any updates? Google approve your APP?? I have the same problem..
@@gjanimationstudio2325 hey yeah pleased to inform that Google indeed did allow my app eventually. Just give them the full information that they demand in the form and follow up emails.
@@EnglishRain can you send me your web site link? I want to check it as a example.
@@EnglishRain how many times are you waiting until Google Approves your APP??
5 weeks??
I really appreciate how you started with a walkthrough of the design document. I don't think I've seen this approach in other channels, and I feel like it prepared me to better understand what we're doing and why some steps were there. A good insight into real-life professional development. Keep up the great work!
Thank you so much! And that Project Design Document part... mind blowing! Gonna start doing it for everything!
Planning, Organization, and Automation are key!
Thanks so much for this tutorial!
I've never done any sort of coding before, in this much depth, but for some reason the way you've explained the process makes me feel confident i can figure this out! xD i'll be back in a week with how i went :P I have about 300 individual videos i want to automate uploading to a youtube channel from metadata i've already created in a CSV file / google sheet so this looks promising!
It's not hard at all. It's mostly gluing together bunch of libraries (which is what software development mostly is). Good luck.
hey i really enjoyed your video!
Thank you for the video. It works like a charm! I'm going to create an automated uploading system with nodeJS. I wonder if we need to refresh our access token every one hour? (In current "client_oauth_token.json" expiry time equals 1 hour only)
also my question. token seems to have an expiry_date and the tutorial doesnt explain how to deal with it
This is sick, did you have to verify your app with Google oauth in order to upload to youtube with restricted scopes? I can only download from youtube by default and looks like you need verification before you can use the youtube.upload scope? Please correct me if I'm wrong.
Love you!
Please make a video for beginner. don't skip any single basic steps.
Have you found a way to "publish" more than one video at a time? When I was messing around with this last summer I had an issue automating this part of the flow
Does it not work when you call the upload API endpoint with multiple videos with their status set to public? There wasn't any note in the API docs against this.
What should I put in empty the 'redirect_uris' array? Also, there is no "Other" option in 'Select the application type' in Google Cloud.
As you can see from the code, redirect URIs are inside the credentials file: gist.github.com/soygul/42677432fa89df7fd783e0232a43a8cf#file-youtube-upload-js-L103
That file is auto generated so you don't have to put in anything by yourself. Let it be. I got the "Other" option in application type selection when creating my project, maybe they have recently removed it. I also tried with "Desktop" option, which also worked, so you can try that too.
can you post the full code instead of just the youtube.js file
when trying to get the token, i get an access_denied error 403 on the page the link leads to
Any update on if there is a python version. I've never worked with node js (just know very basic JS) so I would prefer python. If not, any advice on where I can get some basics on node.js to adapt this for my own workflow?
I don't have the python version yet. If you want to learn some basic node.js, their documentation and guides are exceptionally good: nodejs.org/en/docs/guides/
Does it work on monetized channels, Uploading process is quiet different on these channels
Any chance to do this without approving IPI from Google console?
Hi thanks for the great tutorial, I'm having one issue with the api after authenticating correctly it's then giving me 'Error: No access, refresh token or API key is set'. This is weird because from what I'm looking over this should be working fine. Any ideas?
I had the same problem. Windows Security was blocking access to /Documents folder to my script. Otherwise, check if you have the token file in place and it is not getting deleted by something after logging in.
@@QuanticDev thanks for getting back to me, I later realised that I had the two files mixed up and now it's working! Only issue is the API cap of like 6 videos a day but it's fine
@@WisingMC Good to hear. Did you have to request whitelisting for your API or did you use an existing old project like I did in the video?
@@QuanticDev Oddly it seemed to work fine just uploading with a fresh project. I don't know if it was the conent I was uploading but when uploaded to public instantly they were locked for their spam policies so that's probably why an older project is better
@@WisingMC Ah maybe they changed their policies slightly since this video. Anyway, have fun!
What is token path? is it an api key?
can we get url of uploaded video anyhow
this has suddenly stopped working
I get error:: invalid_grant every time
why do i get localhost- port problem , how can i solve this
Error: No access, refresh token or API key is set.
its giving me this error even i off ransomware protection. i hope you help me to resolve this
You are either not logged in or the app just cannot access the key. As you said, no 1 reason is antivirus stuff. Otherwise, it can be anything.
(n) video private and blocked
You need to request your upload project to be whitelisted. Then it should be fine. I'm still using mine and it's all good.
incomplete tutorial
Thank you, but your tutorial is incomplete. Unnecessary information at 1:00-4:00. There is no description for the start script, so it's not possible to run "npm start". Running "node youtube-upload.js" does nothing. I'm a web developer. So after some changes the script runs. Thank you!