FunctionsExtractorUrl to content

Youtube To Text

ai-research-agent / extractor/url-to-content/youtube-to-text

Extract

convertYoutubeToText()

function convertYoutubeToText(videoUrl: string, options?: object): object;

Defined in: src/extractor/url-to-content/youtube-to-text.js:19

Fetch youtube.com video's webpage HTML for embedded transcript. If blocked, use scraper of alternative sites providing transcripts.

Parameters

ParameterTypeDescription

videoUrl

string

options?

{ addTimestamps: boolean; timeout: boolean; }

options.addTimestamps?

boolean

default=true - true to return timestamps, default true

options.timeout?

boolean

default=5 - http request timeout

Returns

object

where content is the full text of the transcript, timestamps is a string of comma-separated [characterIndex, timeSeconds] pairs, and word_count is the number of words in the transcript.

NameTypeDefined in

content

string

src/extractor/url-to-content/youtube-to-text.js:12

timestamps

string

src/extractor/url-to-content/youtube-to-text.js:12

word_count

number

src/extractor/url-to-content/youtube-to-text.js:12

Author

ai-research-agent (2024)

Other

fetchViaYoutubeToTranscriptCom()

function fetchViaYoutubeToTranscriptCom(videoId: any, options: object): any;

Defined in: src/extractor/url-to-content/youtube-to-text.js:153

Fetch-based scraper of youtubetotranscript.com

Parameters

ParameterType

videoId

any

options

{ }

Returns

any

content, timestamps - where content is the full text of the transcript, and timestamps is an array of [characterIndex, timeSeconds]

On this page