Sha256: 4c401f2a2c2361822765791c55d42f0aa8a7ea25000d89d37d17396884f28bfc

Contents?: true

Size: 510 Bytes

Versions: 51

Compression:

Stored size: 510 Bytes

Contents

module HttpCrawler
  module Proxy
    class Client < HttpCrawler::Client

      class << self

        # 接收格式
        # web_name = "test_proxy_api"
        # 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例
        #
        def for(web_name, *arg)
          "HttpCrawler::Proxy::#{web_name.camelize}::Client".constantize.new(*arg)
        end

      end

      def max_error_num
        @max_error_num ||= 0
      end

    end
  end
end

load File.dirname(__FILE__) + '/test_proxy_api/client.rb'

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
http_crawler-0.3.2.12 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.11 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.10 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.9 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.8 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.7 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.6 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.5 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.4 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.3 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.2 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.1 lib/http_crawler/proxy/client.rb
http_crawler-0.3.2.0 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.31 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.30 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.29 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.28 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.27 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.26 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.25 lib/http_crawler/proxy/client.rb