Public
Edited
Mar 12, 2023
Insert cell
Insert cell
import { button } from '@player1537/utilities';
Insert cell
import('youtube-transcript')
Insert cell
{
return await require("https://cdn.skypack.dev/youtube-transcript@1.0.4")
}
Insert cell
viewof VIDEO = Inputs.text({ label: 'YouTube Video ID', value: '5SfySmq20Dk' })
Insert cell
{
await (yield button('Execute')).promise;
const response = await fetch(`https://video.google.com/timedtext?type=track&v=${VIDEO}&id=0&lang=en`, {
mode: 'cors',
});

const text = await response.text();

yield htl.html`<textarea rows=24 cols=80>${text}`;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more