Class: IdsPlease::Youtube

Inherits:
BaseParser show all
Defined in:
lib/ids_please/youtube.rb

Constant Summary collapse

MASK =
/youtu\.be|youtube/i

Class Method Summary collapse

Methods inherited from BaseParser

network_name, parse

Class Method Details



5
6
7
8
9
10
11
# File 'lib/ids_please/youtube.rb', line 5

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