Class: HttpCrawler::Proxy::Client
- Defined in:
- lib/http_crawler/proxy/client.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Client
#all_timeout, #connect_time, #cookies, #error_urls, #header, #read_time, #redirect, #response, #uri, #write_time
Class Method Summary collapse
-
.for(web_name, *arg) ⇒ Object
接收格式 web_name = “test_proxy_api” 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例.
Instance Method Summary collapse
Methods inherited from Client
#add_error_url, #auto_proxy=, for_module, for_uri, #get, #get_proxy, #get_uri, #http, #inheritance_cookies, #init_client, #init_cookies, #init_header, #init_ssl, #init_timeout, #init_uri, #initialize, #post, #proxy_api, #proxy_params, #remove_traces, #replace_header, #update_cookies, #update_header, #update_proxy, #update_proxy?, #update_uri, #validation_to_proxy?
Constructor Details
This class inherits a constructor from HttpCrawler::Client
Class Method Details
.for(web_name, *arg) ⇒ Object
接收格式 web_name = “test_proxy_api” 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例
11 12 13 |
# File 'lib/http_crawler/proxy/client.rb', line 11 def for(web_name, *arg) "HttpCrawler::Proxy::#{web_name.camelize}::Client".constantize.new(*arg) end |
Instance Method Details
#max_error_num ⇒ Object
17 18 19 |
# File 'lib/http_crawler/proxy/client.rb', line 17 def max_error_num @max_error_num ||= 0 end |