-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from TentacleSama4254/main
Typescript rewrite + Save cookies(LoginInfo)
- Loading branch information
Showing
13 changed files
with
226 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,3 +106,4 @@ dist | |
*.mp4 | ||
test.js | ||
thumbnail.png | ||
yt-auth/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"tabWidth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export * from './upload' | ||
|
||
/* | ||
Usage: | ||
const { upload } = require('youtube-videos-uploader'); | ||
// recoveryemail is optional, only required to bypass login with recovery email if prompted for confirmation | ||
const credentials = { email: 'email', pass: 'pass', recoveryemail: 'recoveryemail' } | ||
// minimum required options to upload video | ||
const video1 = { path: 'video1.mp4', title: 'title 1', description: 'description 1' } | ||
const onVideoUploadSuccess = (videoUrl) => { | ||
// ..do something.. | ||
} | ||
// Extra options like tags, thumbnail, language, playlist etc | ||
const video2 = { path: 'video2.mp4', title: 'title 2', description: 'description 2', thumbnail:'thumbnail.png', language: 'english', tags: ['video', 'github'], playlist: 'playlist name', onSuccess:onVideoUploadSuccess } | ||
// Returns uploaded video links in array | ||
upload (credentials, [video1, video2]).then(console.log) | ||
// OR | ||
// This package uses Puppeteer, you can also pass Puppeteer launch configuration | ||
upload (credentials, [video1, video2], {headless:false}).then(console.log) | ||
// Refer Puppeteer documentation for more launch configurations like proxy etc | ||
// https://pptr.dev/#?product=Puppeteer&version=main&show=api-puppeteerlaunchoptions | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export interface Video { | ||
path: string | ||
title: string | ||
description: string | ||
tags?: string[] | ||
language?: string | ||
playlist?: string | ||
function?: any | ||
thumbnail?: string | ||
onSuccess?: Function | ||
} | ||
|
||
export interface Credentials { | ||
email: string | ||
pass: string | ||
recoveryemail?: string | undefined | ||
} |
Oops, something went wrong.