Class: ProxyFetcher::Providers::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/proxy_fetcher/providers/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.fetch_proxies!(filters = {}) ⇒ Object



17
18
19
# File 'lib/proxy_fetcher/providers/base.rb', line 17

def fetch_proxies!(filters = {})
  new.fetch_proxies!(filters)
end

Instance Method Details

#fetch_proxies!(filters = {}) ⇒ Object

Loads proxy provider page content, extract proxy list from it and convert every entry to proxy object.



12
13
14
# File 'lib/proxy_fetcher/providers/base.rb', line 12

def fetch_proxies!(filters = {})
  load_proxy_list(filters).map { |html| to_proxy(html) }
end