Simple youtube uploader bot made with puppeteer
Tried Using fawazahmed0/youtube-uploader package, the package wasn't fexible enough to fulfill my need, and there is issue with youtube upload stuck at Processing 95%(classic problem).
Will include later or partially implemented
- Solved Processing Problem
- Login and saving session
- Creating Playlist
- Can add tags
- Publishes Video
- Better Error Handling
- Code Refactoring or maybe event based approach
- Uploading and Saving Link to a file
- Continue where left off, if error occured
- Adding Video constraint like title, description, and playlist length limit; special characters
- Writing test
youtube uploader requires Node.js v10+ to run.
enviornment variables for now
create .env
file in root directory
EMAIL="your@email.com"
PASSWORD="your_password"
Installing dependencies and running in development
npm install
npm run dev --videos-dir=/absolute/path/to/the/video/containing/folder
edit index.ts
file in src
directory
let video = new Video({
title: d.name.length <= 100? d.name: d.name.slice(0,100) ,
localPath: entry,
madeForKid: false,
visibility: 'public',
playlist: 'your playlist',
tags: ['your tag']
})
d
and entry
here passed by generator function that is looping through your directory. d
hold the refernce to current file and entry
path to the file.
you can add your logic here for adding dynamic playlist name I've kept my videos in nested folder so that my folder's name is video playlist(😎)
It can upload bunch of video at once. If you find any sort of error while running feel free report a new issue