-
Notifications
You must be signed in to change notification settings - Fork 8
/
start.ts
22 lines (20 loc) · 1.33 KB
/
start.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Youtube from "./youtube"
require("dotenv").config()
const youtube = new Youtube();
(async () => {
// const result = await youtube.playlists.items("https://www.youtube.com/playlist?list=PL1BC175_2xP8ifSS9CM92G5eIOPRG1g7t")
// const result = await youtube.playlists.item("PL1BC175_2xP8ifSS9CM92G5eIOPRG1g7t", "tenpi - moonlight (chill)")
// const result = await youtube.channels.comments("tenpi")
// const result = await youtube.comments.thread("UgzNgGMYuY6qJl0RV7d4AaABAg")
// const result = await youtube.comments.get("UgzNgGMYuY6qJl0RV7d4AaABAg")
// const result = await youtube.channels.subscriptions("https://www.youtube.com/channel/UCwgEMWqaNlp0TVb5BLqO-jg/videos")
// await youtube.util.downloadMyVideo("mLJQ0HO5Alc", key, cookie, "./videos")
// await youtube.util.downloadMyVideos("tenpi", key, cookie, "./videos/tenpi")
// await youtube.util.downloadMP3("https://www.youtube.com/watch?v=LysVlPg2fd8", "./videos/ytdl/bad")
// await youtube.util.downloadChannelVideos("UC8qU4aFe81jzG1attsyQ5wQ", "./videos/tenpi")
// console.log(result.items[0])
const d = await youtube.util.downloadMP3("https://www.youtube.com/watch?v=OJf04b6884E", "./videos")
console.log(d)
const c = await youtube.util.downloadThumbnail("https://www.youtube.com/watch?v=OJf04b6884E", "./videos")
console.log(c)
})()