module RSocial::Youtube::Client::Channels
Public Instance Methods
channel(channel_id)
click to toggle source
# File lib/rsocial/youtube/client/channels.rb, line 5 def channel(channel_id) run( "https://www.youtube.com/channel/#{channel_id}/", channel_injections ).merge(:channel_id => channel_id) end
channels_instance(channel_id)
click to toggle source
# File lib/rsocial/youtube/client/channels.rb, line 12 def channels_instance(channel_id) wd = Driver.instance.send( "chrome" ) wd.get "https://www.youtube.com/channel/#{channel_id}/" wd end
Private Instance Methods
channel_injections()
click to toggle source
# File lib/rsocial/youtube/client/channels.rb, line 20 def channel_injections { :subscriber_count => "return document.getElementsByClassName('yt-subscription-button-subscriber-count-branded-horizontal')[0].textContent" } end