Skip to content

Get video info from Youtube, Vimeo, Dailymotion, Viddler and Metacafe url.

License

Notifications You must be signed in to change notification settings

ouranos/video_info

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoInfo

Small Ruby plugin to get video info from :

  • Youtube

  • Vimeo

  • Dailymotion

  • Viddler

  • Metacafe

Install

./script/plugin install git://github.com/ouranos/video_info.git

Usage

video = VideoInfo.new("http://www.youtube.com/watch?v=mZqGqE0D0n4")

video.id               => "mZqGqE0D0n4"
video.provider         => "YouTube"
video.title            => "Cherry Bloom - King Of The Knife"
video.description      => "The first video from the upcoming album Secret Sounds, to download in-stores April 14. Checkout http://www.cherrybloom.net"
video.keywords         => "alternative, bloom, cherry, clip, drum, guitar, king, knife, of, Paris-Forum, rock, the, tremplin"
video.duration         => 175 (in seconds)
video.date             => Sat Apr 12 22:25:35 UTC 2008
video.thumbnail_small  => "http://i.ytimg.com/vi/mZqGqE0D0n4/2.jpg"
video.thumbnail_large  => "http://i.ytimg.com/vi/mZqGqE0D0n4/0.jpg"
video.player           => "http://www.youtube.com/v/mZqGqE0D0n4&fs=1"

video = VideoInfo.new("http://vimeo.com/898029")

video.id               => "898029"
video.provider         => "Vimeo"
video.title            => "Cherry Bloom - King Of The Knife"
video.description      => "The first video from the upcoming album Secret Sounds, to download in-stores April 14. Checkout http://www.cherrybloom.net"
video.keywords         => "alternative, bloom, cherry, clip, drum, guitar, king, knife, of, Paris-Forum, rock, the, tremplin"
video.duration         => 175 (in seconds)
video.date             => Mon Apr 14 13:10:39 +0200 2008
video.width            => 640
video.height           => 360
video.thumbnail_small  => "http://ts.vimeo.com.s3.amazonaws.com/343/731/34373130_100.jpg"
video.thumbnail_large  => "http://ts.vimeo.com.s3.amazonaws.com/343/731/34373130_640.jpg"
video.player           => "http://vimeo.com/moogaloop.swf?clip_id=898029&server=vimeo.com&show_title=1&show_portrait=0&fullscreen=1"

video = VideoInfo.new("http://badurl.com/898029")

video.valid? => false

Authors

License

Copyright © 2010 Olivier Brisse

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Get video info from Youtube, Vimeo, Dailymotion, Viddler and Metacafe url.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%