Giter Site home page Giter Site logo

f-person / youtube_caption_scraper Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 5.0 347 KB

A Dart package that parses subtitles/captions from YouTube

Home Page: https://pub.dev/packages/youtube_caption_scraper

License: MIT License

Dart 100.00%
dart flutter youtube youtube-captions

youtube_caption_scraper's Introduction

codecov Pub version

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}');
}

For more info see example or check the API reference.

Credits

The package is heavily inspired by algolia/youtube-captions-scraper.

youtube_caption_scraper's People

Contributors

f-person avatar hyungtaecf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

youtube_caption_scraper's Issues

http version is too old

i got this error while trying to install the package:

Because every version of youtube_caption_scraper depends on http ^0.13.4 and shintube depends on http ^1.1.0, youtube_caption_scraper is
  forbidden.
So, because shintube depends on youtube_caption_scraper any, version solving failed.

I need the higher version of http to do other stuff in my project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.