Module: VideoParser

Extended by:
VideoParser
Included in:
VideoParser
Defined in:
lib/video_parser.rb,
lib/video_parser/tudou.rb,
lib/video_parser/youku.rb,
lib/video_parser/slideshare.rb,
lib/video_parser/video_site.rb

Overview

VideoParser support video site:

  • youku

  • tudou

  • slideshare

Defined Under Namespace

Classes: SlideShare, TuDou, VideoSite, YouKu

Instance Method Summary collapse

Instance Method Details

#get(url, options = {}) ⇒ Object

get video info from url

video info include

  • title

  • thumbnail pic path

  • video src



22
23
24
25
26
# File 'lib/video_parser.rb', line 22

def get(url, options = {})
  uri = URI.parse(auto_complete_url(url)) rescue nil
  video_site = get_video_site(uri)
  video_site && video_site.new(uri).get(options)
end