youtube-to-text
ai-research-agent / extractor/url-to-content/youtube-to-text
Extract
convertYoutubeToText()
function convertYoutubeToText(videoUrl, options?): object
Fetch youtube.com video's webpage HTML for embedded transcript. If blocked, use scraper of alternative sites providing transcripts.
Parameters
Parameter | Type | Description |
---|---|---|
|
| |
| { | |
|
| default=true - true to return timestamps, default true |
|
| 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.
Name | Type |
---|---|
content | string |
timestamps | string |
word_count | number |
Author
Other
fetchViaYoutubeToTranscriptCom()
function fetchViaYoutubeToTranscriptCom(videoId, options): Object
Fetch-based scraper of youtubetotranscript.com
Parameters
Parameter | Type |
---|---|
|
|
| {} |
Returns
Object
content, timestamps - where content is the full text of the transcript, and timestamps is an array of [characterIndex, timeSeconds]