Sha256: 4eba7465f2c35cd549383e7f51c91f83b3622bf93300a60366fc9f2cf9486f7f

Contents?: true

Size: 307 Bytes

Versions: 2

Compression:

Stored size: 307 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 clean_url
      "https://www.youtube.com/watch?v=#{id}"
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
film_snob-0.1.1 lib/film_snob/youtube.rb
film_snob-0.1.0 lib/film_snob/youtube.rb