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

yt-transcript

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yt-transcript - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

44

dist/index.d.ts

@@ -24,2 +24,42 @@ type Only<T, U> = {

/**
* YtTranscript is a simple unoffical library to interact with YouTube transcripts for Chrome extension
* this library is inspired from Python library `youtube-transcript-api`
* @class
* @classdesc Class to interact with YouTube transcripts
* @example
* const transcript = new YtTranscriptChrome({ html: '<html>...</html>' })
* const transcript = new YtTranscriptChrome({ html: '<html>...</html>' })
*
* const list = await transcript.listAllTranscripts()
* const script = await transcript.getTranscript('en-US')
*/
declare class YtTranscriptChrome {
private html;
/**
* Create a new instance of YtTranscript
* @param {html} param0
*/
constructor({ html }: {
html: string;
});
/**
* List all available transcripts for the video
* @returns {Promise<TrasncriptInfo[]>} returns a list of available transcripts
*/
listAllTranscripts(): Promise<TrasncriptInfo[]>;
/**
* Get transcript by language
* @param {string} languageCode
* @returns {Promise<TrasncriptInfo | null>} returns a transcript object or null if not found
*/
getTranscriptByLanguage(languageCode: string): Promise<TrasncriptInfo | null>;
/**
* Get transcript by language
* @param {string} languageCode
* @returns {Promise<YTranscript | null>} returns a transcript object or null if not found
*/
getTranscript(languageCode?: string): Promise<YTranscript[] | null>;
}
type YtTranscriptConstructor = Either<{

@@ -40,3 +80,3 @@ url: string;

* const list = await transcript.listAllTranscripts()
* const transcript = await transcript.getTranscript('en-US')
* const script = await transcript.getTranscript('en-US')
*/

@@ -69,2 +109,2 @@ declare class YtTranscript {

export { YtTranscript };
export { YtTranscript, YtTranscriptChrome };

2

package.json
{
"name": "yt-transcript",
"type": "module",
"version": "0.0.1",
"version": "0.0.2",
"packageManager": "pnpm@8.15.3",

@@ -6,0 +6,0 @@ "description": "A youtube transcript fetcher",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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