class FYT::Parser
reads and prepares a youtube feed for further processing
Public Class Methods
new(url, proxy_manager)
click to toggle source
# File lib/fyt/parser.rb, line 8 def initialize(url, proxy_manager) @url = url @proxy_manager = proxy_manager end
Public Instance Methods
read()
click to toggle source
# File lib/fyt/parser.rb, line 13 def read proxy = @proxy_manager.get! open(@url, proxy: 'http://' + proxy.url) do |rss| return RSS::Parser.parse(rss, false) end rescue @proxy_manager.remove(proxy) read if @proxy_manager.proxies.size > 0 end