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

ytpl

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytpl

Anonymous YouTube playlist resolver.

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NPM version NPM downloads Dependencies Dependencies Discord

NPM info

node-ytpl

Simple js only module to resolve YouTube playlist ids Doesn't need any login or GoogleAPI key

Usage

var ytpl = require('ytpl');

ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg', function(err, playlist) {
  if(err) throw err;
  dosth(playlist);
});

API

ytpl(id, [options], [callback])

Attempts to resolve the given playlist id

  • id

    • id of the yt-playlist
    • or playlist link
    • or user link (resolves uploaded playlist)
    • or channel link (resolves uploaded playlist)
  • options

    • object with options
    • possible settings:
    • limit[Number] -> limits the pulled items, defaults to 100, set to 0 or Infinity to get the whole playlist
  • callback(err, result)

    • function
    • getting fired after the request is done
    • contains an error or a result
  • returns a Promise when no callback is defined

  • Example response

ytpl.validateURL(string)

Returns true if able to parse out a (formally) valid playlist ID.

ytpl.getPlaylistID(string, [callback])

Returns a playlist ID from a YouTube URL. Can be called with the playlist ID directly, in which case it returns it. If callback isn't given, returns a promise.

Install

npm install --save ytpl

License

MIT

Keywords

FAQs

Package last updated on 06 Aug 2020

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