Sha256: b1c8f02ae3db6ad0de92147d28808d3fa4ed6f5f98616401d0ddde56d48471cd

Contents?: true

Size: 364 Bytes

Versions: 7

Compression:

Stored size: 364 Bytes

Contents

class IdsPlease
  module Parsers
    class Youtube < IdsPlease::Parsers::Base

      MASK = /youtu\.be|youtube/i

      class << self
        private

        def parse_link(link)
          if link.path =~ /channels|user/
            link.path.split('/')[2]
          else
            link.path.split('/')[1]
          end
        end
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ids_please-2.2.0 lib/ids_please/parsers/youtube.rb
ids_please-2.1.2 lib/ids_please/parsers/youtube.rb
ids_please-2.1.1 lib/ids_please/parsers/youtube.rb
ids_please-2.1.0 lib/ids_please/parsers/youtube.rb
ids_please-2.0.0.beta2 lib/ids_please/parsers/youtube.rb
ids_please-2.0.0.beta1 lib/ids_please/parsers/youtube.rb
ids_please-2.0.0.beta lib/ids_please/parsers/youtube.rb