Class: YoutubeParser::Search::Channels

Inherits:
BaseParser
  • Object
show all
Defined in:
lib/youtube_parser/search/channels.rb

Constant Summary collapse

DEFAULT_PARAMS =
{ sp: 'EgIQAg%3D%3D' }.freeze

Instance Attribute Summary

Attributes inherited from BaseParser

#options

Instance Method Summary collapse

Methods inherited from BaseParser

#initialize, options, #resource

Constructor Details

This class inherits a constructor from YoutubeParser::BaseParser

Instance Method Details

#for_each_channelObject



14
15
16
17
18
# File 'lib/youtube_parser/search/channels.rb', line 14

def for_each_channel
  for_each_page do |channels|
    channels.each { |channel| yield channel_info channel }
  end
end

#infoObject



10
11
12
# File 'lib/youtube_parser/search/channels.rb', line 10

def info
  (channels(search)[:channels] || []).map { |c| channel_info c }
end