Module: HttpCrawler::Proxy
- Includes:
- Client
- Defined in:
- lib/http_crawler/proxy.rb,
lib/http_crawler/proxy/client.rb,
lib/http_crawler/proxy/response.rb,
lib/http_crawler/proxy/test_proxy_api/client.rb,
lib/http_crawler/proxy/test_proxy_api/response.rb,
lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
Defined Under Namespace
Modules: Client, Response, TestProxyApi
Instance Attribute Summary
Attributes included from Client
Class Method Summary collapse
-
.for(web_name, *arg) ⇒ Object
接收格式 web_name = “test_proxy_api” 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例.
Instance Method Summary collapse
Methods included from Client
#add_error_url, #auto_proxy=, #cookies, for_module, #get, #get_proxy, #header, #http, #init_client, #init_header, #init_ssl, #init_timeout, #init_uri, #initialize, #post, #proxy_api, #proxy_params, #update_header, #update_proxy, #update_proxy?, #validation_to_proxy?
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.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.rb', line 17 def max_error_num @max_error_num ||= 0 end |