Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youtube-chapters-finder

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-chapters-finder

A tiny npm library that gets chapters from any Youtube video

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
0
Weekly downloads
 
Created
Source

youtube-chapters-finder

A tiny npm library that helps get chapters from any Youtube video.

Current version


Problem

I wanted to get the chapters from a youtube video, but I couldn't find such functionality in the Youtube API. So I made one.

Installation

npm i youtube-chapters-finder

Example

Get all chapters from this youtube video: https://youtube.com/watch?v=Gi8LUnhP5yU

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

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

Keywords

FAQs

Package last updated on 24 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc