class VkMusic::WebParser::Playlist
Playlist
mobile web page parser
Public Instance Methods
audios()
click to toggle source
@return [Array<Audio>]
# File lib/vk_music/web_parser/playlist.rb, line 8 def audios Utility::AudioItemsParser.call(node, @client_id) end
real_size()
click to toggle source
@return [Integer?]
# File lib/vk_music/web_parser/playlist.rb, line 26 def real_size content = node.at_css('.audioPlaylist__footer').content matches = content.gsub(/\s/, '').match(/^(\d+)/)&.captures matches ? Integer(matches.first, 10) : nil end
subtitle()
click to toggle source
@return [String?]
# File lib/vk_music/web_parser/playlist.rb, line 18 def subtitle result = node.at_css('.audioPlaylist__subtitle').content.strip return if result.nil? || result.empty? result end
title()
click to toggle source
@return [String]
# File lib/vk_music/web_parser/playlist.rb, line 13 def title node.at_css('.audioPlaylist__title').content.strip end