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.1.24 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.23 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.22 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.21 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.20 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.19 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.18 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.17 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.16 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.15 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.14 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.13 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.12 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.11 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.10 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.9 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.8 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.7 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.6 lib/http_crawler/proxy/client.rb
http_crawler-0.3.1.5 lib/http_crawler/proxy/client.rb