Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
node-apiless-youtube-upload
Advanced tools
Readme
Upload videos to Youtube in node.js, ts-node or electron, and on windows or linux without any Youtube API dependency! Chromedriver required by Selenium will be automatically downloaded during runtime (using node-chromedriver-downloader). Note: headless login is out of scope for this module, because it's difficult to maintain.
npm install node-apiless-youtube-upload
import {promptLoginAndGetCookies, uploadVideo} from 'node-apiless-youtube-upload'
promptLoginAndGetCookies().then(cookies => {
uploadVideo({
videoPath: 'C:/Users/gladiatortoise/Desktop/testVideo.mp4',
title: '📡 Automatically Uploaded Video 📡',
description: 'This is a placeholder description.',
thumbnailPath: 'C:/Users/gladiatortoise/Desktop/TestThumbnail.jpg',
visibility: 'unlisted',
monetization: false
}, cookies)
})
import YoutubeUploader from 'node-apiless-youtube-upload'
(async () => {
const youtubeUploader = new YoutubeUploader()
const cookiesPath = process.cwd() + '/cookies_saved.json'
// Try loading cookies from disk
try {
await youtubeUploader.loadCookiesFromDisk(cookiesPath)
if (!(await youtubeUploader.checkCookiesValidity())) {
throw new Error('Cookies loaded from disk are not valid')
}
} catch(e) {
console.log('Prompting Google login..')
// Open a login window for Google account. Cookies will be stored in the youtubeUploader instance
await youtubeUploader.promptLoginAndGetCookies()
// Save cookies
await youtubeUploader.saveCookiesToDisk(cookiesPath)
}
// Upload a video to youtube
await youtubeUploader.uploadVideo({
videoPath: 'C:/Users/gladiatortoise/Desktop/testVideo.mp4',
title: '📡 Automatically Uploaded Video 📡',
description: 'This is a placeholder description.',
thumbnailPath: 'C:/Users/gladiatortoise/Desktop/TestThumbnail.jpg',
visibility: 'unlisted',
monetization: false
})
})()
const {promptLoginAndGetCookies, uploadVideo} = require('node-apiless-youtube-upload')
promptLoginAndGetCookies().then(cookies => {
uploadVideo({
videoPath: 'C:/Users/gladiatortoise/Desktop/testVideo.mp4',
title: '📡 Automatically Uploaded Video 📡',
description: 'This is a placeholder description.',
thumbnailPath: 'C:/Users/gladiatortoise/Desktop/TestThumbnail.jpg',
visibility: 'unlisted',
monetization: false
}, cookies)
})
At least node 7.6 for async/await support and a Chrome web browser. Unfortunately MacOs is not (yet) supported
Recent changes in Youtube v3 API (2020, September) made it impossible to upload videos from unverified apps. Google does not verify apps for internal or private use. This module is intended to be an easy solution for programmatically uploading videos to Youtube.
Massive thanks to @Jaqen00 for helping with testing!
FAQs
Upload videos to Youtube in Node.js without any Youtube API dependency by using Selenium.
The npm package node-apiless-youtube-upload receives a total of 12 weekly downloads. As such, node-apiless-youtube-upload popularity was classified as not popular.
We found that node-apiless-youtube-upload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.