Project

youtube_id

0.01
No commit activity in last 3 years
No release in over 3 years
Easily extract the video id from youtube videos urls
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

YoutubeId

Simple video id extraction from youtube urls.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'youtube_id'

And then execute:

$ bundle

Or install it yourself as:

$ gem install youtube_id

Usage

YoutubeID.from("http://www.youtube.com/watch?v=RCUkmUXMd_k") # => "RCUkmUXMd_k"

It supports these url formats:

http://www.youtube.com/v/RCUkmUXMd_k
http://www.youtube.com/v/RCUkmUXMd_k?version=3&hl=en_US&rel=0
http://www.youtube.com/embed/RCUkmUXMd_k?rel=0
http://www.youtube.com/watch?v=RCUkmUXMd_k
http://www.youtube.com/watch?v=RCUkmUXMd_k&feature=related
http://www.youtube.com/watch?v=RCUkmUXMd_k#t=0m10s
http://www.youtube.com/user/ForceD3strategy#p/a/u/0/8WVTOUh53QY
http://youtu.be/RCUkmUXMd_k

See the specs for more detailed information.