Sha256: 6da20033faf73121e22faadbdd6112290aec15b1c7c0cc637039ecafb9c269dc
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
require "film_snob/video_site" class FilmSnob class YouTube < VideoSite def self.valid_url_patterns [ %r{ https?://(?:(?:www|m).)?youtube.com/watch\? (?:feature=[\w\.]+&)?v=([\w\d\-_]+) }x, %r{https?://(?:(?:www|m).)?youtu.be/([\w\d\-_]+)}, %r{https?://(?:(?:www|m).)?youtube.com/v/([\w\d\-_]+)} ] end def self.oembed_endpoint "https://www.youtube.com/oembed" end def clean_url @clean_url ||= "https://www.youtube.com/watch?v=#{id}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
film_snob-0.6.5 | lib/film_snob/video_sites/youtube.rb |