Skip to content

initseis/youtube-captions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

youtube-captions

Install

gem install youtube-captions

or add to gemfile

gem "youtube-captions"

Usage

# "id" can be video url
video = YoutubeCaptions::Video.new(id: "abc123")

Captions with default language

=> video.captions
=> [
  {
    "__content__" => "Welcome to Ruby",
    "start" => "0.16",
    "dur" => "3.92"
  }
  ...
]

Captions with specific language (must be available)

=> video.captions(lang: "es")
=> [
  {
    "__content__" => "Bienvenido a Ruby",
    "start" => "0.16",
    "dur" => "3.92"
  }
  ...
]

Available languages

=> video.available_langs
=> ["es", "en", "pt"]

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

About

A gem to get youtube video captions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages