Sha256: 8dd239d1220f716e2773c846ea10d8a34ca69b66395fde515d7161979f4acbe1

Contents?: true

Size: 405 Bytes

Versions: 14

Compression:

Stored size: 405 Bytes

Contents

class FilmSnob
  class YouTube < VideoSite

    def self.valid_url_patterns
      [
        %r{https?://(?:(?:www|m).)?youtube.com/watch\?v=([\w\d\-_]+)},
        %r{https?://(?:(?:www|m).)?youtu.be/([\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

14 entries across 14 versions & 1 rubygems

Version Path
film_snob-0.3.11 lib/film_snob/youtube.rb
film_snob-0.3.10 lib/film_snob/youtube.rb
film_snob-0.3.9 lib/film_snob/youtube.rb
film_snob-0.3.8 lib/film_snob/youtube.rb
film_snob-0.3.7 lib/film_snob/youtube.rb
film_snob-0.3.6 lib/film_snob/youtube.rb
film_snob-0.3.5 lib/film_snob/youtube.rb
film_snob-0.3.4 lib/film_snob/youtube.rb
film_snob-0.3.3 lib/film_snob/youtube.rb
film_snob-0.3.2 lib/film_snob/youtube.rb
film_snob-0.3.1 lib/film_snob/youtube.rb
film_snob-0.3.0 lib/film_snob/youtube.rb
film_snob-0.2.1 lib/film_snob/youtube.rb
film_snob-0.2.0 lib/film_snob/youtube.rb