youtube_caption_scraper

Creator: coderz1093

Last updated:

0 purchases

youtube_caption_scraper Image
youtube_caption_scraper Images
Add to Cart

Description:

youtube caption scraper

A Dart package that parses lyrics from YouTube. No authentication is required.
Usage #
// Instantiate the scraper.
final captionScraper = YouTubeCaptionScraper();

// Fetch caption tracks – these are objects containing info like
// base url for the caption track and language code.
final captionTracks = await captionScraper.getCaptionTracks('video-url');

// Fetch the subtitles by providing it with a `CaptionTrack`
// from `getCaptionTracks`.
final subtitles = await captionScraper.getSubtitles(captionTracks[0]);

// Use the subtitles however you want.
for (final subtitle in subtitles) {
print('${subtitle.start} - ${subtitle.duration} - ${subtitle.text}');
}
copied to clipboard
For more info see
example
or check the
API reference.
Credits #
The package is heavily inspired by
algolia/youtube-captions-scraper.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.