Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buikhacnam/youtube-chapters-finder
a tiny package to extract chapters with times from any Youtube video!
https://github.com/buikhacnam/youtube-chapters-finder
chapters nodejs npm-package youtube youtube-chapter-extractor youtube-chapters
Last synced: 3 months ago
JSON representation
a tiny package to extract chapters with times from any Youtube video!
- Host: GitHub
- URL: https://github.com/buikhacnam/youtube-chapters-finder
- Owner: buikhacnam
- License: mit
- Created: 2023-09-24T07:46:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-24T08:16:17.000Z (5 months ago)
- Last Synced: 2024-10-01T15:49:12.794Z (4 months ago)
- Topics: chapters, nodejs, npm-package, youtube, youtube-chapter-extractor, youtube-chapters
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/youtube-chapters-finder
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
## Problem
I wanted to get the chapters from a youtube video, but I couldn't find such functionality in the [Youtube API](https://developers.google.com/youtube/v3). So I made one.## Installation
`npm i youtube-chapters-finder`
## Example
Get all chapters from this youtube video: https://youtube.com/watch?v=Gi8LUnhP5yU
```js
import YoutubeChaptersGetter from 'youtube-chapters-finder'async function getChapters() {
return await YoutubeChaptersGetter.getChapter('Gi8LUnhP5yU') // video id
}// expected output:
[
{
title: 'Introduction',
time: '0:00',
url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=0s'
},
{
title: 'Are there intelligent life out there',
time: '2:27',
url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=147s'
},
{
title: 'We dont mean all of space',
time: '3:02',
url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=182s'
},
{
title: 'Intelligent life',
time: '5:42',
url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=342s'
},
...
]```
[![Edit bold-ellis-6rg1t](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/devbox/youtube-chapters-finder-v4mz2m?file=%2Findex.ts%3A13%2C22)
## Usage
This package is intended to be used in server-side applications (Next.js included). I may add support for client-side applications in the future.
## License
MIT License