npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zyt.uploader

v1.0.4

Published

<h1 align="center">Youtube video uploader</h1>

Downloads

7

Readme

ZYT Uploader

npm version


🚨important : This is not the final version, I did it just as a provisional, In case you find any issue, please raise an issue, So that I can fix it.

Please star this repo by clicking on :star: button above :arrow_upper_right:

ZytUploader is a Node.js library that simplifies the process of uploading videos to YouTube without the limitations of the Google API. This library, written in TypeScript, utilizes Puppeteer for automation.

Features:

  • No upload Limits (50+ videos/day limit set by youtube for every channel)
  • Free & Easy to use

Prerequisite:

Installation:

npm i zyt-uploader

Usage:

To use zyt-uploader, follow these steps:

Import the ZytUploader class and create an instance:

const { ZytUploader } = require('zyt-uploader');
const zytUploader = new ZytUploader();

Authenticate and load cookies:

const credentialsFile = 'youtubeCredentials.json';
const loginParams = {
    email: 'your email',
    password: 'your password',
    launchOptions: {
        headless: false,
    },
};

await zytUploader.loadCookiesFromFile(credentialsFile).catch(async (e) => {
    await zytUploader.loginAndGetCookies(loginParams);
    await zytUploader.saveCookiesOnDisk(credentialsFile);
});

Check if cookies are valid and re-authenticate if necessary:

const cookieIsValid = await zytUploader.cookiesIsValid();
if (!cookieIsValid) {
    await zytUploader.loginAndGetCookies(loginParams);
}

Upload a video using the uploadVideo method:

const videoUrl = await zytUploader.uploadVideo({
    videoPath: 'video.mp4',
    title: '👩‍💻 Video uploaded by zyt-uploader',
    description: 'zyt-upload project: https://github.com/zaacksb/zyt-uploader',
    thumbnailPath: 'thumbnail.jpg',
    tags: ['nodejs', 'zyt'],
    visibility: 'unlisted',
    launchOptions: {
        headless: 'new',
    },
});

set up event listeners for progress, logs, errors, daily limit, and upload completion:

zytUploader.on('progress', ({action, percentage, remainingTime}) => {
    console.log({action, percentage, remainingTime});
});

zytUploader.on('progressText', (progress) => {
    console.log(`Event progress: ${progress}`);
});

zytUploader.on('logs', (log) => {
    console.log(log);
});

zytUploader.on('dailyLimit', (message) => {
    console.log(message);
});

zytUploader.on('error', (error) => {
    console.log(error);
});

zytUploader.on('uploaded', (url) => {
    console.log(`Video uploaded: ${url}`);
});

Additional Information

To see the browser window during execution, use headless: false. For headless operation, use headless: "new".

You can monitor the progress of the upload using the 'progress' event, which provides information about the action, percentage, and remaining time.

The 'logs' event logs all messages during the process.

The 'error' event provides error information, including codes and messages.

The 'dailyLimit' event notifies you if you reach the daily upload limit on YouTube.

The 'uploaded' event is triggered when the entire upload process is complete, providing the URL of the uploaded video.

License

This library is distributed under the MIT license. Feel free to use, modify, and distribute it as needed.

For more details, check out the zyt-uploader GitHub repository.

Based on the youtube-uploader library by fawazahmed0